Page MenuHomePhabricator

D11292.diff
No OneTemporary

D11292.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
Thu, Oct 17, 6:58 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6717317
Default Alt Text
D11292.diff (1 KB)

Event Timeline