Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14347931
D17097.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
971 B
Referenced Files
None
Subscribers
None
D17097.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryDefaultController.php b/src/applications/diffusion/controller/DiffusionRepositoryDefaultController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryDefaultController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryDefaultController.php
@@ -2,6 +2,15 @@
final class DiffusionRepositoryDefaultController extends DiffusionController {
+ public function shouldAllowPublic() {
+ // NOTE: We allow public access to this controller because it handles
+ // redirecting paths that are missing a trailing "/". We need to manually
+ // redirect these instead of relying on the automatic redirect because
+ // some VCS requests may omit the slashes. See T12035, and below, for some
+ // discussion.
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$response = $this->loadDiffusionContext();
if ($response) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 4:05 AM (20 h, 58 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6909470
Default Alt Text
D17097.diff (971 B)
Attached To
Mode
D17097: Redirect `/source/x` (no slash) to `/source/x/` (canonical) when viewer is logged out and "x" is public
Attached
Detach File
Event Timeline
Log In to Comment