From: Florent Bruneau Date: Tue, 2 Dec 2008 18:07:56 +0000 (+0100) Subject: Trim regexps to avoid the 'baldelx' effect. X-Git-Tag: xorg/0.10.0~7 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=50579de4416173b970ad17fe8953414ebd2fa1c3;p=platal.git Trim regexps to avoid the 'baldelx' effect. Signed-off-by: Florent Bruneau --- diff --git a/modules/auth.php b/modules/auth.php index 6ac8b9a..5b9748f 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -163,7 +163,8 @@ class AuthModule extends PLModule while (list($privkey,$name,$datafields,$returnurls) = $res->next()) { if (md5($gpex_challenge.$privkey) == $gpex_pass) { - if ($returnurls == "" || @preg_match($returnurls, $gpex_url)) { + $returnurls = trim($returnurls); + if (empty($returnurls) || @preg_match($returnurls, $gpex_url)) { $returl = $gpex_url . gpex_make_params($gpex_challenge, $privkey, $datafields, $charset); http_redirect($returl); }