Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13966212
D11292.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D11292.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D11292: Make test for setting "next" cookie more general
Attached
Detach File
Event Timeline
Log In to Comment