Closed
Bug 1272298
Opened 8 years ago
Closed 8 years ago
NULL character (U+0000) in the form can not be submitted
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: 446240525, Assigned: baku)
Details
Attachments
(1 file)
9.84 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
open http://output.jsbin.com/hubihutige, click the submit button. the url in location bar should be http://output.jsbin.com/hubihutige?name=%00
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → amarchesini
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8752231 -
Flags: review?(bugs)
Comment 2•8 years ago
|
||
Comment on attachment 8752231 [details] [diff] [review] escape.patch >-nsFSURLEncoded::URLEncode(const nsAString& aStr, nsCString& aEncoded) >+nsFSURLEncoded::URLEncode(const nsAString& aStr, nsACString& aEncoded) > { > // convert to CRLF breaks >+ int32_t convertedBufLength = 0; > char16_t* convertedBuf = >- nsLinebreakConverter::ConvertUnicharLineBreaks(PromiseFlatString(aStr).get(), >+ nsLinebreakConverter::ConvertUnicharLineBreaks(aStr.BeginReading(), > nsLinebreakConverter::eLinebreakAny, >- nsLinebreakConverter::eLinebreakNet); >+ nsLinebreakConverter::eLinebreakNet, >+ aStr.Length(), >+ &convertedBufLength); > NS_ENSURE_TRUE(convertedBuf, NS_ERROR_OUT_OF_MEMORY); > >+ nsAutoString convertedString; >+ convertedString.Adopt(convertedBuf, convertedBufLength); Could the string be just nsString, given that you don't use the internal buffer for anything. I wonder if we could get rid of nsEscape and just always use nsEscapeWithLength, and then pass ns(C)String around, and not raw char pointers. But not about this bug.
Attachment #8752231 -
Flags: review?(bugs) → review+
Comment 4•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e486707bccdc
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•5 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•