If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Infinite redirect loop if user profile doesn't exist

VERIFIED FIXED in 2.4.1

Status

support.mozilla.org
General
P2
normal
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: jsocol, Assigned: paulc)

Tracking

unspecified
2.4.1

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
If a user doesn't exist, going to their profile at /users/123456/ will raise a 404, that our strip-slash middleware will catch, and redirect to /users/123456. Since that's not a valid route, Django will add the slash and send it back to /users/123456/, which, etc...

We should steal AMO's method of dealing with trailing slashes, as it avoids this.

Also, we should get consistent, and either use them everywhere or nowhere, but that's a bigger bug.

This is not a Users & Groups bug, because the slash-stripping middleware is global. This is just an easy example/test-case.
(Assignee)

Updated

7 years ago
Assignee: nobody → paulc
Priority: -- → P2
(Assignee)

Comment 1

7 years ago
URLs don't have slashes anymore. URLs with slashes are redirected to the removed-trailing-slash version.

https://github.com/jsocol/kitsune/commit/b2bc6de1f6d6c33ba497f9326394dab9d4bff73d
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Verified going to invalid user profile with or without trailing slash just gets page not found- no error or redirect
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.