From 50579de4416173b970ad17fe8953414ebd2fa1c3 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 2 Dec 2008 19:07:56 +0100 Subject: [PATCH] Trim regexps to avoid the 'baldelx' effect. Signed-off-by: Florent Bruneau --- modules/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.1.4