Skip to content

Commit

Permalink
If the login redirect is to logout.php, redirect to index.php instead
Browse files Browse the repository at this point in the history
  • Loading branch information
zrhoffman committed Sep 17, 2018
1 parent 039c829 commit dd867c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

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)['path'] != '/logout.php') {
redirect($referer);
}
redirect('index.php');
Expand Down

0 comments on commit dd867c4

Please sign in to comment.