Bug 254336 - WebKit Bugzilla patch review action redirects non-patches infinitely
Summary: WebKit Bugzilla patch review action redirects non-patches infinitely
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-23 08:36 PDT by Michael Catanzaro
Modified: 2023-05-08 15:58 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2023-03-23 08:36:49 PDT
This is a decade-old bug that I've just never taken the time to properly report before now.

Try to load https://bug-254326-attachments.webkit.org/attachment.cgi?id=465550&action=review in WebKitGTK and the load will fail with error message "Load cannot follow more than 20 redirections." If we try the same thing with curl:

$ curl -L 'https://bug-254326-attachments.webkit.org/attachment.cgi?id=465550&action=review'
curl: (47) Maximum (50) redirects followed

So WebKitGTK has the same behavior as curl. Problem is https://bug-254326-attachments.webkit.org/attachment.cgi?id=465550&action=review redirects to https://bugs.webkit.org/attachment.cgi?id=465550&=&action=review, but that itself redirects back to https://bug-254326-attachments.webkit.org/attachment.cgi?id=465550&action=review, so there's no winning.
Comment 1 Alexey Proskuryakov 2023-03-23 14:58:12 PDT
This happens when the attachment isn't a patch. It would be nice to make the redirection make more sense indeed.
Comment 2 Radar WebKit Bug Importer 2023-03-30 08:37:15 PDT
<rdar://problem/107421556>
Comment 3 lingho@apple.com 2023-03-30 09:05:50 PDT
How does one gets to this link that includes action=review?
Comment 4 Alexey Proskuryakov 2023-03-30 09:09:47 PDT
Bugzilla emails contain links with "action=review" for every added attachment.
Comment 5 Michael Catanzaro 2023-05-08 13:55:26 PDT
(In reply to Alexey Proskuryakov from comment #4)
> Bugzilla emails contain links with "action=review" for every added
> attachment.

Proposal: we could simply stop adding this to the links in emails? There are very few patches being landed via Bugzilla nowadays, so the desired action= is almost never going to be "review". Then most people would never notice this bug.
Comment 6 Alexey Proskuryakov 2023-05-08 15:58:57 PDT
We can probably make the appending conditional almost as easily.

The review functionality is all ours, not coming from Mozilla, so whoever implemented this must have made too big of a simplification.