From 2bf450bfdf04cb64ff3ddb8fcefe1ed4fb535352 Mon Sep 17 00:00:00 2001 From: ap Date: Fri, 12 May 2006 04:51:25 +0000 Subject: [PATCH] Reviewed by Darin. - http://bugzilla.opendarwin.org/show_bug.cgi?id=8770 XMLHttpRequest should strip CR/LF characters from the URL Test: fast/loader/url-strip-cr-lf-tab.html * platform/KURL.cpp: (appendEscapingBadChars): Strip CR, LF and TAB, as Firefox and IE do. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14320 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- LayoutTests/ChangeLog | 10 +++++++ .../loader/url-strip-cr-lf-tab-expected.txt | 4 +++ .../fast/loader/url-strip-cr-lf-tab.html | 26 +++++++++++++++++++ WebCore/ChangeLog | 14 +++++++++- WebCore/platform/KURL.cpp | 2 +- 5 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 LayoutTests/fast/loader/url-strip-cr-lf-tab-expected.txt create mode 100644 LayoutTests/fast/loader/url-strip-cr-lf-tab.html diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog index 5d95a8d9aea4..69da47ae6b97 100644 --- a/LayoutTests/ChangeLog +++ b/LayoutTests/ChangeLog @@ -1,3 +1,13 @@ +2006-05-11 Alexey Proskuryakov + + Reviewed by Darin. + + - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8770 + XMLHttpRequest should strip CR/LF characters from the URL + + * fast/loader/url-strip-cr-lf-tab-expected.txt: Added. + * fast/loader/url-strip-cr-lf-tab.html: Added. + 2006-05-11 Justin Garcia Reviewed by thatcher, levi diff --git a/LayoutTests/fast/loader/url-strip-cr-lf-tab-expected.txt b/LayoutTests/fast/loader/url-strip-cr-lf-tab-expected.txt new file mode 100644 index 000000000000..10a3fa9d9582 --- /dev/null +++ b/LayoutTests/fast/loader/url-strip-cr-lf-tab-expected.txt @@ -0,0 +1,4 @@ +Test for bug 8770: XMLHttpRequest should strip CR/LF characters from the URL (not just XMLHttpRequest, really, and TAB is also stripped). +Success + + diff --git a/LayoutTests/fast/loader/url-strip-cr-lf-tab.html b/LayoutTests/fast/loader/url-strip-cr-lf-tab.html new file mode 100644 index 000000000000..5a1651dac87f --- /dev/null +++ b/LayoutTests/fast/loader/url-strip-cr-lf-tab.html @@ -0,0 +1,26 @@ + +Test for bug 8770: +XMLHttpRequest should strip CR/LF characters from the URL (not just XMLHttpRequest, really, and TAB is also stripped). + + + diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 4aae221cdc61..080c6d78b704 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,15 @@ +2006-05-11 Alexey Proskuryakov + + Reviewed by Darin. + + - http://bugzilla.opendarwin.org/show_bug.cgi?id=8770 + XMLHttpRequest should strip CR/LF characters from the URL + + Test: fast/loader/url-strip-cr-lf-tab.html + + * platform/KURL.cpp: + (appendEscapingBadChars): Strip CR, LF and TAB, as Firefox and IE do. + 2006-05-11 David Hyatt Remove the misspelling drawing code from Font and FontData. Implement it @@ -157,7 +169,7 @@ Reviewed by Adele. - - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8743 + - http://bugzilla.opendarwin.org/show_bug.cgi?id=8743 REGRESSION: focus() on input field selects all text within it (was: cannot select cities on British Rail reservation site) diff --git a/WebCore/platform/KURL.cpp b/WebCore/platform/KURL.cpp index 3f2f3e9a3e51..6e16686f3967 100644 --- a/WebCore/platform/KURL.cpp +++ b/WebCore/platform/KURL.cpp @@ -782,7 +782,7 @@ static void appendEscapingBadChars(char*& buffer, const char *strStart, size_t l if (isBadChar(c)) { if (c == '%' || c == '?') { *p++ = c; - } else { + } else if (c != 0x09 && c != 0x0a && c != 0x0d) { *p++ = '%'; *p++ = hexDigits[c >> 4]; *p++ = hexDigits[c & 0xF]; -- 2.36.0