*[refac bug #53548] Check referer url.

This commit is contained in:
wangyidong
2024-08-05 16:04:06 +08:00
committed by 孙广明
parent 4310ab9aaa
commit 8f40f15890
+2
View File
@@ -1124,6 +1124,7 @@ class baseControl
{
if(!empty($data['message'])) echo js::alert($data['message']);
$locate = $data['locate'] ?? $_SERVER['HTTP_REFERER'] ?? '';
if($locate && preg_match('/\(/', $locate)) $locate = $this->config->webRoot;
if(!empty($locate)) return helper::end(js::locate($locate));
return helper::end($data['message'] ?? 'success');
}
@@ -1136,6 +1137,7 @@ class baseControl
{
echo js::alert($data['message']);
$locate = $data['locate'] ?? $_SERVER['HTTP_REFERER'] ?? '';
if($locate && preg_match('/\(/', $locate)) $locate = $this->config->webRoot;
if (!empty($locate)) return helper::end(js::locate($locate));
return helper::end($data['message'] ?? 'fail');
}