com web/bugs: If the login redirect is to logout.php, redirect to index.php instead: www/login.php

From: Date: Mon, 17 Sep 2018 12:19:19 +0000
Subject: com web/bugs: If the login redirect is to logout.php, redirect to index.php instead: www/login.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-27281@lists.php.net to get a copy of this message
Commit: 88fca9dcbcc4551bc6a45b5e3a3cd3553494d15b Author: zrhoffman <zrhoffman@ku.edu> Mon, 17 Sep 2018 14:05:02 +0200 Committer: Christoph M. Becker <cmbecker69@gmx.de> Mon, 17 Sep 2018 14:19:19 +0200 Parents: 904b512d0682bd5edd24cba0c8e1346e92575424 Branches: master Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=88fca9dcbcc4551bc6a45b5e3a3cd3553494d15b Log: If the login redirect is to logout.php, redirect to index.php instead Changed paths: M www/login.php Diff: diff --git a/www/login.php b/www/login.php index 5c15530..dc7bd38 100644 --- a/www/login.php +++ b/www/login.php @@ -17,7 +17,8 @@ if (isset($_POST['user'])) { if ($logged_in === 'developer') { if (!empty($_POST['referer']) && - preg_match("/^{$site_method}:\/\/". preg_quote($site_url) .'/i', $referer)) { + preg_match("/^{$site_method}:\/\/". preg_quote($site_url) .'/i', $referer) && + parse_url($referer, PHP_URL_PATH) != '/logout.php') { redirect($referer); } redirect('index.php');

« previous php.webmaster (#27281) next »