Bug 254336

Summary: WebKit Bugzilla patch review action redirects non-patches infinitely
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, lingho, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

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&amp;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&amp;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&amp;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.