Bug 246478

Summary: Commit URLs causing 500 Internal Server Error
Product: WebKit Reporter: lingho <lingho>
Component: WebKit WebsiteAssignee: lingho <lingho>
Status: RESOLVED FIXED    
Severity: Normal CC: jond, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description lingho@apple.com 2022-10-13 15:50:46 PDT
When a commit range URL in the form of "https://commits.webkit.org/compare/123456@main<ellipsis>234567@main" is entered into a comment, saving the comment, or subsequence comments causes bug page to return 500 Internal Server Error.
Comment 1 lingho@apple.com 2022-10-13 15:51:16 PDT
rdar://98541419
Comment 2 lingho@apple.com 2022-10-13 16:02:54 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5349
Comment 3 lingho@apple.com 2022-10-13 16:06:54 PDT
The old regex was matching the 2nd commit ID, causing that part to be replaced with a URL, which in turn causing the 500 error.

The new regex should not match /123456@main and …123456@main and thus leave them alone.
Comment 4 lingho@apple.com 2022-10-13 17:56:08 PDT
Updated title to cover another issue reported by Fujihori https://webkit.slack.com/archives/CU64U6FDW/p1664478835893709

where url such as this
https://commits.webkit.org/ + 252432.352@safari-7614-branch is causing issue.
Comment 5 EWS 2022-10-14 17:05:45 PDT
Committed 255564@main (f59283656141): <https://commits.webkit.org/255564@main>

Reviewed commits have been landed. Closing PR #5349 and removing active labels.