Skip to content

EventSource: do not allow lastEventId creation when the id contains U+0000 - #6584

Merged
cdumez merged 2 commits into
masterfrom
annevk/eventsource-id
Aug 16, 2017
Merged

cdumez merged 2 commits into
masterfrom
annevk/eventsource-id

Conversation

@annevk

@annevk annevk commented Jul 19, 2017 •

Copy link
Copy Markdown
Member

@ghost

ghost commented Jul 19, 2017 •

Copy link
Copy Markdown

Build PASSED

Started: 2017-08-16 08:13:34
Finished: 2017-08-16 08:23:43

View more information about this build on:

@ghost

ghost commented Jul 19, 2017 •

Copy link
Copy Markdown

View the complete job log.

Sauce (safari)

Testing web-platform-tests at revision 4ca6708
Using browser at version 10.0
Starting 10 test iterations
All results were stable

All results

3 tests ran
/eventsource/format-field-id-2.htm
Subtest Results Messages
OK
/eventsource/format-field-id-null.htm
Subtest Results Messages
TIMEOUT
EventSource: U+0000 in id field TIMEOUT Test timed out
/eventsource/format-field-id.htm
Subtest Results Messages
OK

@ghost

ghost commented Jul 19, 2017 •

Copy link
Copy Markdown

View the complete job log.

Chrome (unstable)

Testing web-platform-tests at revision 4ca6708
Using browser at version 61.0.3159.5 dev
Starting 10 test iterations
All results were stable

All results

3 tests ran
/eventsource/format-field-id-2.htm
Subtest Results Messages
OK
EventSource: Last-Event-ID (2) PASS
/eventsource/format-field-id-null.htm
Subtest Results Messages
OK
EventSource: U+0000 in id field FAIL assert_equals: expected "" but got "\0\0"
/eventsource/format-field-id.htm
Subtest Results Messages
OK
EventSource: Last-Event-ID PASS

@ghost

ghost commented Jul 19, 2017 •

Copy link
Copy Markdown

View the complete job log.

Sauce (MicrosoftEdge)

Testing web-platform-tests at revision 4ca6708
Using browser at version 14.14393
Starting 10 test iterations
All results were stable

All results

3 tests ran
/eventsource/format-field-id-2.htm
Subtest Results Messages
OK
EventSource: Last-Event-ID (2) FAIL 'EventSource' is undefined
/eventsource/format-field-id-null.htm
Subtest Results Messages
OK
EventSource: U+0000 in id field FAIL 'EventSource' is undefined
/eventsource/format-field-id.htm
Subtest Results Messages
OK
EventSource: Last-Event-ID FAIL 'EventSource' is undefined

@annevk
annevk force-pushed the annevk/eventsource-id branch from 384ea58 to 2a453c0 Compare July 20, 2017 10:23
domenic pushed a commit to whatwg/html that referenced this pull request Aug 3, 2017
Comment thread eventsource/format-field-id-null.htm Outdated
test.step(function() {
if(e.data == "hello" && !seenhello) {
seenhello = true
assert_equals(e.lastEventId, "\0\0")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am trying to get this test to pass in WebKit via https://bugs.webkit.org/show_bug.cgi?id=175178. However, I get the empty string here instead of "\0\0". Would you mind clarifying why we expect lastEventId to contain NUL here (I thought this is what we were trying to avoid).

Disclaimer: I am very unfamiliar with EventSource so this may well be a silly question :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's bogus, I must have accidentally pushed my work-in-progress and assumed I was done.

@cdumez cdumez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cdumez
cdumez merged commit 5dcbb26 into master Aug 16, 2017
@annevk
annevk deleted the annevk/eventsource-id branch August 16, 2017 17:04
hubot pushed a commit to WebKit/WebKit-http that referenced this pull request Aug 16, 2017
https://bugs.webkit.org/show_bug.cgi?id=175178

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import WPT test coverage from:
- web-platform-tests/wpt#6584

* web-platform-tests/eventsource/format-field-id-null-expected.txt: Added.
* web-platform-tests/eventsource/format-field-id-null.htm: Added.
* web-platform-tests/eventsource/resources/last-event-id.py:
(main):
* web-platform-tests/eventsource/w3c-import.log:

Source/WebCore:

EventSource: ignore IDs with U+0000 as per:
whatwg/html#2849

Test: imported/w3c/web-platform-tests/eventsource/format-field-id-null.htm

* page/EventSource.cpp:
(WebCore::EventSource::parseEventStreamLine):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@220799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
rachelandrew pushed a commit to rachelandrew/web-platform-tests that referenced this pull request Nov 8, 2017
…+0000 (web-platform-tests#6584)

* EventSource: do not allow lastEventId creation when the id contains U+0000

See whatwg/html#689.
alice pushed a commit to alice/html that referenced this pull request Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants