Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dbee191016c7b8f2565244171fdad0f383943dde
https://github.com/WebKit/WebKit/commit/dbee191016c7b8f2565244171fdad0f383943dde
Author: Chris Dumez <[email protected]>
Date: 2026-03-23 (Mon, 23 Mar 2026)
Changed paths:
M Source/WTF/wtf/URLParser.cpp
M Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp
Log Message:
-----------
Fix typo in URLParser FilePathStart causing backslash to skip Windows drive
letter detection
https://bugs.webkit.org/show_bug.cgi?id=310503
Reviewed by Ryosuke Niwa.
The condition on the FilePathStart state had `*c != '\\'` instead of
`*c == '\\'`, making the block unreachable for backslash characters.
This caused the inner syntax violation check to be dead code and,
more importantly, skipped the Windows drive letter canonicalization
(e.g. normalizing C| to C:) for file URLs with a backslash path
separator after an empty host, such as `file://\C|\path`.
Test: Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::parse):
* Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp:
(TestWebKitAPI::TEST_F(WTF_URLParser, FilePathStartBackslash)):
Canonical link: https://commits.webkit.org/309737@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications