mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 05:41:52 +09:00
Update App.php
This commit is contained in:
1 parent
0cc9921009
commit
3a63263f8d
1 file changed
+3
-3
@@ -282,11 +282,11 @@ class Box_App {
|
||||
];
|
||||
|
||||
foreach ($adminApiPrefixes as $adminApiPrefix){
|
||||
$realAdminApiUrl = $rootUrl[-1]==='/'?substr($rootUrl, 0 ,-1).$adminApiPrefix:$rootUrl.$adminApiPrefix;
|
||||
$realAdminApiUrl = $rootUrl [-1] === '/' ? substr($rootUrl, 0 ,-1).$adminApiPrefix : $rootUrl.$adminApiPrefix;
|
||||
$allowedURLs[] = parse_url($realAdminApiUrl)['path'];
|
||||
}
|
||||
foreach ($allowedURLs as $url){
|
||||
if(preg_match('/^'.str_replace('/','\/', $url).'(.*)/', $REQUEST_URI)!==0){
|
||||
if (preg_match('/^'.str_replace('/','\/', $url).'(.*)/', $REQUEST_URI) !== 0){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -333,7 +333,7 @@ class Box_App {
|
||||
$realAdminUrl = $rootUrl[-1] === '/' ? substr($rootUrl, 0 ,-1).$adminPrefix : $rootUrl.$adminPrefix;
|
||||
$realAdminPath = parse_url($realAdminUrl)['path'];
|
||||
|
||||
if(preg_match('/^'.str_replace('/','\/', $realAdminPath).'(.*)/', $REQUEST_URI) !== 0) {
|
||||
if (preg_match('/^'.str_replace('/','\/', $realAdminPath).'(.*)/', $REQUEST_URI) !== 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user