Closed
Bug 1279467
Opened 9 years ago
Closed 9 years ago
failing NULL byte pattern in form validation
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox47 | --- | wontfix |
firefox48 | --- | fixed |
firefox49 | --- | fixed |
firefox-esr45 | --- | unaffected |
firefox50 | --- | fixed |
People
(Reporter: mail, Assigned: arai)
References
Details
Attachments
(1 file)
1.68 KB,
patch
|
till
:
review+
gchang
:
approval-mozilla-aurora+
gchang
:
approval-mozilla-beta+
ritu
:
approval-mozilla-release-
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160604131506
Steps to reproduce:
create <input pattern="[\0]+"> and set its value to "0".
see http://jsbin.com/noledanoso/edit?html,js,output
Actual results:
the input element was set :invalid
Expected results:
the input element should be valid, as 0 (the number) is not the NULL byte.
Reporter | ||
Comment 1•9 years ago
|
||
Of course the "Steps to reproduce" should've contained ^ to negate the character set:
<input pattern="[^\0]+">
Note that Firefox used to get this right. Version 45 behaved like Chrome, Safari, IE - i.e. not considering the field invalid for value "0". We've seen this first break in 46.
Assignee | ||
Comment 2•9 years ago
|
||
apparently a bug in RegExp parser.
will fix this shortly.
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Assignee | ||
Updated•9 years ago
|
Blocks: 1135377
status-firefox47:
--- → affected
status-firefox48:
--- → affected
status-firefox49:
--- → affected
status-firefox50:
--- → affected
status-firefox-esr45:
--- → unaffected
See Also: → 1227906
Assignee | ||
Comment 3•9 years ago
|
||
Forgot to advance the cursor, and \0 is parsed as \0 and 0...
Assignee: nobody → arai.unmht
Attachment #8762086 -
Flags: review?(till)
Comment 4•9 years ago
|
||
Comment on attachment 8762086 [details] [diff] [review]
Fix null handling in RegExp character class with unicode flag.
Review of attachment 8762086 [details] [diff] [review]:
-----------------------------------------------------------------
Makes sense. r=me
Attachment #8762086 -
Flags: review?(till) → review+
Assignee | ||
Comment 5•9 years ago
|
||
thank you for reviewing :D
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e2b029c616d5cd48e7a6647181f392dd9d14ff8
Bug 1279467 - Fix null handling in RegExp character class with unicode flag. r=till
Comment 7•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Assignee | ||
Comment 8•9 years ago
|
||
Comment on attachment 8762086 [details] [diff] [review]
Fix null handling in RegExp character class with unicode flag.
Approval Request Comment
[Feature/regressing bug #]: bug 1135377
[User impact if declined]: Certain webpage that contains unicode RegExp in JavaScript code, or pattern attribute of INPUT element may behave wrongly
[Describe test coverage new/current, TreeHerder]: testes as automated test in m-c
[Risks and why]: Very low. Added one missing operation that won't introduce any issue
[String/UUID change made/needed]: None
Attachment #8762086 -
Flags: approval-mozilla-release?
Attachment #8762086 -
Flags: approval-mozilla-beta?
Attachment #8762086 -
Flags: approval-mozilla-aurora?
Comment 9•9 years ago
|
||
Comment on attachment 8762086 [details] [diff] [review]
Fix null handling in RegExp character class with unicode flag.
Review of attachment 8762086 [details] [diff] [review]:
-----------------------------------------------------------------
This patch fixes null handling in RegExp. Take it in beta & aurora.
Attachment #8762086 -
Flags: approval-mozilla-beta?
Attachment #8762086 -
Flags: approval-mozilla-beta+
Attachment #8762086 -
Flags: approval-mozilla-aurora?
Attachment #8762086 -
Flags: approval-mozilla-aurora+
Comment 10•9 years ago
|
||
Note for Ritu, I don't think we need to bring this into a dot release for 47. It regressed in 46 and if the problem were very widespread, we would likely have heard about it earlier or in duplicate bugs.
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
bugherder uplift |
Comment on attachment 8762086 [details] [diff] [review]
Fix null handling in RegExp character class with unicode flag.
I don't believe this is a critical enough issue to be included in a dot release. Wontfix for 47.
Attachment #8762086 -
Flags: approval-mozilla-release? → approval-mozilla-release-
Changing regression version to 46 as per comment 10.
Version: 47 Branch → 46 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•