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

fix($cookies): update $cookies to prevent duplicate cookie writes #11515

Closed
wants to merge 1 commit into from

Conversation

chrisakers
Copy link

update $cookies to prevent duplicate cookie writes and play nice with external code

Update the ngCookies service to prevent repetitive writes via $browser.cookies()
Also it is possible for $cookies to get confused about cookies modified outside of $cookies and
see those changes as user changes via the $cookies service which would then be set again. This
unnecessary setting of cookies can duplicate or overwrite depending on the original cookie's
domain. This update prevents that scenario.

Closes #11490

… play nice with external code

Update the ngCookies service to prevent repetitive writes via $browser.cookies()
Also it is possible for $cookies to get confused about cookies modified outside of $cookies and
see those changes as user changes via the $cookies service which would then be set again. This
unnecessary setting of cookies can duplicate or overwrite depending on the original cookie's
domain. This update prevents that scenario.

Closes angular#11490
updated = true;
}
}

//verify what was actually stored
if (updated) {
updated = false;
Copy link
Author

Choose a reason for hiding this comment

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

updated is not evaluated after line 106.

@caitp
Copy link
Contributor

caitp commented Apr 13, 2015

looks good to igor

@Narretz Narretz added this to the 1.3.16 milestone Apr 20, 2015
IgorMinar pushed a commit that referenced this pull request Jun 5, 2015
… play nice with external code

Update the ngCookies service to prevent repetitive writes via $browser.cookies()
Also it is possible for $cookies to get confused about cookies modified outside of $cookies and
see those changes as user changes via the $cookies service which would then be set again. This
unnecessary setting of cookies can duplicate or overwrite depending on the original cookie's
domain. This update prevents that scenario.

Closes #11490
Closes #11515
@IgorMinar
Copy link
Contributor

landed as 706a93a

thanks!

@IgorMinar IgorMinar closed this Jun 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants