Page MenuHomePhabricator

D11292.id.diff
No OneTemporary

D11292.id.diff

diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php
--- a/src/applications/auth/controller/PhabricatorAuthStartController.php
+++ b/src/applications/auth/controller/PhabricatorAuthStartController.php
@@ -77,17 +77,23 @@
}
$next_uri = $request->getStr('next');
- if (!$next_uri) {
- $next_uri_path = $this->getRequest()->getPath();
- if ($next_uri_path == '/auth/start/') {
- $next_uri = '/';
- } else {
- $next_uri = $this->getRequest()->getRequestURI();
+ if (!strlen($next_uri)) {
+ if ($this->getDelegatingController()) {
+ // Only set a next URI from the request path if this controller was
+ // delegated to, which happens when a user tries to view a page which
+ // requires them to login.
+
+ // If this controller handled the request directly, we're on the main
+ // login page, and never want to redirect the user back here after they
+ // login.
+ $next_uri = (string)$this->getRequest()->getRequestURI();
}
}
if (!$request->isFormPost()) {
- PhabricatorCookies::setNextURICookie($request, $next_uri);
+ if (strlen($next_uri)) {
+ PhabricatorCookies::setNextURICookie($request, $next_uri);
+ }
PhabricatorCookies::setClientIDCookie($request);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 10:48 PM (14 h, 1 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6779876
Default Alt Text
D11292.id.diff (1 KB)

Event Timeline