Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fix($$cookieReader): safe get cookie #15532

Closed
wants to merge 1 commit into from
Closed

fix($$cookieReader): safe get cookie #15532

wants to merge 1 commit into from

Conversation

sp00m
Copy link
Contributor

@sp00m sp00m commented Dec 20, 2016

Return an empty string when an error is catched while getting cookie.

Closes #15523

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix

What is the current behavior? (You can also link to an open issue here)

#15523

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

No.

Please check if the PR fulfills these requirements

Other information:

Return an empty string when an error is catched while getting cookie.

Closes #15523
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@sp00m
Copy link
Contributor Author

sp00m commented Dec 20, 2016

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

Copy link
Member

@gkalpak gkalpak left a comment

Choose a reason for hiding this comment

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

LGTM

@gkalpak gkalpak closed this in f768da2 Dec 20, 2016
gkalpak pushed a commit that referenced this pull request Dec 20, 2016
…ookie`

In certain cases (e.g. on LG webOS using the `file:` protocol), access to
`document.cookie` may not be allowed and throw an error. This could break
`$http` which relies on `$$cookieReader()` for retrieving the XSRF token.
This commit fixes it by treating `document.cookie` as empty, when access to it
is fordibben.

Fixes  #15523

Closes #15532
gkalpak pushed a commit that referenced this pull request Dec 20, 2016
…ookie`

In certain cases (e.g. on LG webOS using the `file:` protocol), access to
`document.cookie` may not be allowed and throw an error. This could break
`$http` which relies on `$$cookieReader()` for retrieving the XSRF token.
This commit fixes it by treating `document.cookie` as empty, when access to it
is fordibben.

Fixes  #15523

Closes #15532
@gkalpak
Copy link
Member

gkalpak commented Dec 20, 2016

Landed, thx! (I hope you don't mind me making some small tweaks 😇 )

ellimist pushed a commit to ellimist/angular.js that referenced this pull request Mar 15, 2017
…ookie`

In certain cases (e.g. on LG webOS using the `file:` protocol), access to
`document.cookie` may not be allowed and throw an error. This could break
`$http` which relies on `$$cookieReader()` for retrieving the XSRF token.
This commit fixes it by treating `document.cookie` as empty, when access to it
is fordibben.

Fixes  angular#15523

Closes angular#15532
@sp00m sp00m deleted the fix-issue-15523 branch February 9, 2022 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$http fails on LG webOS using the file:// protocol as cookies aren't accessible
3 participants