Infinite redirect loop if user profile doesn't exist

VERIFIED FIXED in 2.4.1

Status

P2
normal
VERIFIED FIXED
8 years ago
8 years ago

People

(Reporter: jsocol, Assigned: paulc)

Tracking

unspecified
2.4.1

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 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

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

Comment 1

8 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: 8 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.