summaryrefslogtreecommitdiffstats
path: root/web/lib/acctfuncs.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/acctfuncs.inc.php')
-rw-r--r--web/lib/acctfuncs.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 993cd346..6b7d2275 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -544,7 +544,12 @@ function try_login() {
}
setcookie("AURSID", $new_sid, $cookie_time, "/", null, !empty($_SERVER['HTTPS']), true);
- header("Location: " . get_uri('/'));
+
+ $referer = in_request('referer');
+ if (strpos($referer, aur_location()) !== 0) {
+ $referer = '/';
+ }
+ header("Location: " . get_uri($referer));
$login_error = "";
}