WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
44461
Assertion failure at WebCore/platform/network/CredentialStorage.cpp:85.
https://bugs.webkit.org/show_bug.cgi?id=44461
Summary
Assertion failure at WebCore/platform/network/CredentialStorage.cpp:85.
Yongjun Zhang
Reported
2010-08-23 16:05:59 PDT
WebCore hits assertion failure at /WebCore/platform/network/CredentialStorage.cpp:85 when the url has double slash as folder separator. For example, "
http://foo.com/bar//test.htm
".
Attachments
Attach the callstack when assertion failure happens.
(9.36 KB, text/plain)
2010-08-23 16:08 PDT
,
Yongjun Zhang
no flags
Details
remove redundant forward slashes.
(3.75 KB, patch)
2010-08-23 17:38 PDT
,
Yongjun Zhang
no flags
Details
Formatted Diff
Diff
remove redundant forward slashes. (add new line at end of test file).
(3.72 KB, patch)
2010-08-23 17:42 PDT
,
Yongjun Zhang
ap
: review+
ap
: commit-queue-
Details
Formatted Diff
Diff
Remove the assertion because it is legal to have multiple trailing slashes after the path component.
(1.38 KB, patch)
2010-08-24 12:27 PDT
,
Yongjun Zhang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yongjun Zhang
Comment 1
2010-08-23 16:08:02 PDT
Created
attachment 65171
[details]
Attach the callstack when assertion failure happens.
Yongjun Zhang
Comment 2
2010-08-23 17:38:52 PDT
Created
attachment 65188
[details]
remove redundant forward slashes. Remove redundant forward slashes in directoryURL even though multiple slashes are valid in URL. This fixes the assertion failure and possible protectionSpace mapping failure when two URLs differ only on redundant slashes and they are essentially the same.
Yongjun Zhang
Comment 3
2010-08-23 17:42:15 PDT
Created
attachment 65189
[details]
remove redundant forward slashes. (add new line at end of test file).
Alexey Proskuryakov
Comment 4
2010-08-23 18:30:10 PDT
Comment on
attachment 65189
[details]
remove redundant forward slashes. (add new line at end of test file).
> even though multiple slashes are valid in URL
I'm not really sure on the status of this validity. In file paths, multiple slashes always mean the same as a single one, but I think that in URLs, it's up to the server to make a decision. This thought is what has been preventing from fixing this myself. I guess it's fine for us to do whatever Firefox is doing, and if it normalizes slashes before looking up a directory for stored credentials, so could we. But this patch doesn't quite implement that, as it only removes trailing slashes. + while (index > 0 && directoryURL[index-1] == '/') There should be spaces around "-".
> + index--;
There is no practical difference for integer values, but for consistency with iterators, it's best to always use prefix increment and decrement. When the compiler cannot optimize it, postfix variants create temporary copies.
> + xhr.open("GET", "resources/remember-bad-password//count-failures.php", false);
Ideally, the test would check the response to make sure that mapping doesn't fail (and it should pass in Firefox). r=me.
Alexey Proskuryakov
Comment 5
2010-08-23 18:43:39 PDT
Comment on
attachment 65189
[details]
remove redundant forward slashes. (add new line at end of test file). I expected at least the style issue to be fixed.
Yongjun Zhang
Comment 6
2010-08-23 21:10:20 PDT
(In reply to
comment #5
)
> (From update of
attachment 65189
[details]
) > I expected at least the style issue to be fixed.
sorry, I misread your comments. New patch coming.
Yongjun Zhang
Comment 7
2010-08-24 12:26:03 PDT
I did some test with the assertion removed, and it turns out the assumption in my original patch is wrong. For a URL with double-slash path, it will create another entry in PathToDefaultProtectionSpaceMap along with the URL with single-slash path. So the query in HashMap will fail. But it doesn't affect the authentication because http servers will handle it correctly. Since it is perfectly legal to have multiple slash following the path, I believe we should remove the assertion or come up with a new one which accepts trailing slashes.
Yongjun Zhang
Comment 8
2010-08-24 12:27:34 PDT
Created
attachment 65307
[details]
Remove the assertion because it is legal to have multiple trailing slashes after the path component.
Alexey Proskuryakov
Comment 9
2010-08-24 12:43:09 PDT
Comment on
attachment 65307
[details]
Remove the assertion because it is legal to have multiple trailing slashes after the path component. OK
Yongjun Zhang
Comment 10
2010-08-24 13:31:32 PDT
(In reply to
comment #9
)
> (From update of
attachment 65307
[details]
) > OK
Thanks!
WebKit Commit Bot
Comment 11
2010-08-25 04:37:17 PDT
Comment on
attachment 65307
[details]
Remove the assertion because it is legal to have multiple trailing slashes after the path component. Clearing flags on attachment: 65307 Committed
r66005
: <
http://trac.webkit.org/changeset/66005
>
WebKit Review Bot
Comment 12
2010-08-25 05:15:01 PDT
http://trac.webkit.org/changeset/66005
might have broken SnowLeopard Intel Release (Tests)
Alexey Proskuryakov
Comment 13
2010-08-25 09:39:46 PDT
No way, all it did was remove an assertion.
Adam Barth
Comment 14
2010-08-25 09:42:22 PDT
(In reply to
comment #13
)
> No way, all it did was remove an assertion.
The SL bots are super flaky. There are tests that fail on one of the slaves but not the other. :-/
Eric Seidel (no email)
Comment 15
2010-09-15 00:19:03 PDT
This looks landed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug