From 40a98c0e72c32212ee8dc61ae4dc72c37e6293c8 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Wed, 12 Nov 2025 16:30:26 -0500 Subject: [PATCH] bugfix, only use url reutrn-to parameter if not empty --- src/Auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Auth.php b/src/Auth.php index 0efa392..8ed115c 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -105,8 +105,8 @@ class Auth { } /* if request is valid login attempt, (set cookie and) return to where they came from */ if ($this->login()) { - if (isset($this->get['rt'])) { - header("Location: {$this->get['rt']}"); + if ($this->getReturnTo()) { + header("Location: {$this->getReturnTo()}"); } else if (getenv('PREAUTH_SEND_TO')) { header("Location: " . getenv('PREAUTH_SEND_TO')); }