summaryrefslogtreecommitdiffstats
path: root/inc/util.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2019-12-13 15:57:28 +0100
committerSimon Rettberg2019-12-13 15:57:28 +0100
commitc3b2efc93528b50c480a584c67283afe9ea077b6 (patch)
tree36b5bf27028bf6c342227fa36e9175d46e31135d /inc/util.inc.php
parent[rebootcontrol] Longer cooldown for client status updates (diff)
downloadslx-admin-c3b2efc93528b50c480a584c67283afe9ea077b6.tar.gz
slx-admin-c3b2efc93528b50c480a584c67283afe9ea077b6.tar.xz
slx-admin-c3b2efc93528b50c480a584c67283afe9ea077b6.zip
[inc/Render] Add qstr_urlencode as global mustache var
Diffstat (limited to 'inc/util.inc.php')
-rw-r--r--inc/util.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/util.inc.php b/inc/util.inc.php
index 9c9d4e58..21d784a8 100644
--- a/inc/util.inc.php
+++ b/inc/util.inc.php
@@ -156,13 +156,13 @@ SADFACE;
public static function redirect($location = false, $preferRedirectPost = false)
{
if ($location === false) {
- $location = preg_replace('/(&|\?)message\[\]\=[^&]*/', '\1', $_SERVER['REQUEST_URI']);
+ $location = preg_replace('/([&?])message\[\]\=[^&]*/', '\1', $_SERVER['REQUEST_URI']);
}
Session::save();
$messages = Message::toRequest();
if ($preferRedirectPost
&& ($redirect = Request::post('redirect', false, 'string')) !== false
- && !preg_match(',^(\w+\:|//),', $redirect) /* no uri scheme, no server */) {
+ && !preg_match(',^([0-9a-zA-Z_+\-]+:|//),', $redirect) /* no uri scheme, no server */) {
$location = $redirect;
}
if (!empty($messages)) {