aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-02 14:07:00 +0100
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>2013-03-02 14:07:00 +0100
commit705f8355a95c899c154ba08a159c2d4840fd8c98 (patch)
tree17829ff8d94aa67299d70055bff1146e3eb8b546
parent858c5c2b43ce16f6d4b388725ef2d7a95e4a1986 (diff)
downloadShaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.tar.gz
Shaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.tar.zst
Shaarli-705f8355a95c899c154ba08a159c2d4840fd8c98.zip
Proper redirect in popup when login fails.
This corrects issue https://github.com/sebsauvage/Shaarli/issues/10
-rw-r--r--index.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/index.php b/index.php
index 8a456357..bac5b7d2 100644
--- a/index.php
+++ b/index.php
@@ -410,7 +410,9 @@ if (isset($_POST['login']))
410 else 410 else
411 { 411 {
412 ban_loginFailed(); 412 ban_loginFailed();
413 echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login\';</script>'; // Redirect to login screen. 413 $redir = '';
414 if (isset($_GET['post'])) { $redir = '&post='.urlencode($_GET['post']).(!empty($_GET['title'])?'&title='.urlencode($_GET['title']):'').(!empty($_GET['source'])?'&source='.urlencode($_GET['source']):''); }
415 echo '<script language="JavaScript">alert("Wrong login/password.");document.location=\'?do=login'.$redir.'\';</script>'; // Redirect to login screen.
414 exit; 416 exit;
415 } 417 }
416} 418}