Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for not potentially trustworthy and "file" origins. #219

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ The <dfn method for=CookieStore>set(|name|, |value|)</dfn> method steps are:
1. Let |settings| be [=/this=]'s [=/relevant settings object=].
1. Let |origin| be |settings|'s [=environment settings object/origin=].
1. If |origin| is an [=opaque origin=], then return [=a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
1. If |origin| is not a [=/potentially trustworthy origin=], or if |origin|'s [=origin/scheme=] is "`file`", then return [=a promise rejected with=] a {{TypeError}}.
1. Let |url| be |settings|'s [=environment/creation URL=].
1. Let |p| be [=a new promise=].
1. Run the following steps [=in parallel=]:
Expand All @@ -695,6 +696,7 @@ The <dfn method for=CookieStore>set(|options|)</dfn> method steps are:
1. Let |settings| be [=/this=]'s [=/relevant settings object=].
1. Let |origin| be |settings|'s [=environment settings object/origin=].
1. If |origin| is an [=opaque origin=], then return [=a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
1. If |origin| is not a [=/potentially trustworthy origin=], or if |origin|'s [=origin/scheme=] is "`file`", then return [=a promise rejected with=] a {{TypeError}}.
1. Let |url| be |settings|'s [=environment/creation URL=].
1. Let |p| be [=a new promise=].
1. Run the following steps [=in parallel=]:
Expand Down Expand Up @@ -732,6 +734,7 @@ The <dfn method for=CookieStore>delete(|name|)</dfn> method steps are:
1. Let |settings| be [=/this=]'s [=/relevant settings object=].
1. Let |origin| be |settings|'s [=environment settings object/origin=].
1. If |origin| is an [=opaque origin=], then return [=a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
1. If |origin| is not a [=/potentially trustworthy origin=], or if |origin|'s [=origin/scheme=] is "`file`", then return [=a promise rejected with=] a {{TypeError}}.
1. Let |url| be |settings|'s [=environment/creation URL=].
1. Let |p| be [=a new promise=].
1. Run the following steps [=in parallel=]:
Expand All @@ -754,6 +757,7 @@ The <dfn method for=CookieStore>delete(|options|)</dfn> method steps are:
1. Let |settings| be [=/this=]'s [=/relevant settings object=].
1. Let |origin| be |settings|'s [=environment settings object/origin=].
1. If |origin| is an [=opaque origin=], then return [=a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
1. If |origin| is not a [=/potentially trustworthy origin=], or if |origin|'s [=origin/scheme=] is "`file`", then return [=a promise rejected with=] a {{TypeError}}.
1. Let |url| be |settings|'s [=environment/creation URL=].
1. Let |p| be [=a new promise=].
1. Run the following steps [=in parallel=]:
Expand Down