mirror of https://gitee.com/karson/fastadmin.git
parent
7e6314a701
commit
4eaae6ac4e
|
|
@ -66,7 +66,8 @@ class Index extends Backend
|
||||||
*/
|
*/
|
||||||
public function login()
|
public function login()
|
||||||
{
|
{
|
||||||
$url = $this->request->get('url', 'index/index', 'url_clean');
|
$url = $this->request->get('url', '', 'url_clean');
|
||||||
|
$url = $url ?: 'index/index';
|
||||||
if ($this->auth->isLogin()) {
|
if ($this->auth->isLogin()) {
|
||||||
$this->success(__("You've logged in, do not login again"), $url);
|
$this->success(__("You've logged in, do not login again"), $url);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -514,7 +514,7 @@ if (!function_exists('check_url_allowed')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果是站内相对链接则允许
|
//如果是站内相对链接则允许
|
||||||
if (preg_match("/^[\/a-z][a-z0-9][a-z0-9\.\/]+\$/i", $url) && substr($url, 0, 2) !== '//') {
|
if (preg_match("/^[\/a-z][a-z0-9][a-z0-9\.\/]+((\?|#).*)?\$/i", $url) && substr($url, 0, 2) !== '//') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue