shell bypass 403
<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2020-08-10 http://myucms.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: 梦雨 <50361804@qq.com>
// +----------------------------------------------------------------------
namespace app\admin\controller;
use think\Controller;
use think\Db;
class Login extends Controller
{
//登录
public function index()
{
if (_post()) {
$c = Db::name('user')->where(array('name' => get('name'),'admin' => 1))->find();
if ($c['name'] == get('name')) {
if (md5(get('password')) == $c['password']) {
session('userid', $c['id']);
cookie('uid', $c['uid'],315360000);
return json(array('code' => 1, 'msg' => '登录成功'));
} else {
return json(array('code' => 0, 'msg' => '密码错误'));
}
} else {
return json(array('code' => 0, 'msg' => '账号错误'));
}
}
return view();
}
}