Skip to content

Conversation

@kevinpagtakhan
Copy link
Contributor

Summary

Fixes #481

areCookiesEnabled() creates a cookie that gets rejected by firewalls due to some special characters included in TZ names. It should be safe to replace this cookie value with virtually anything (w/o special characters) since this is short lived and only used to determine if cookies are enabled. I decided to change it to a random-ish value, to avoid potential conflict.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@secure-code-warrior-for-github

Based on output from pull request status check:

Micro-Learning Topic: Insecure randomness (Detected by phrase)

Matched on "Insecure randomness"

What is this? (2min video)

This vulnerability manifests when some security construct depends on a random component and this component is somehow guessable -or just not random-.

Try this challenge in Secure Code Warrior

@lgtm-com
Copy link

lgtm-com bot commented Jan 27, 2022

This pull request introduces 1 alert when merging 42e1f95 into 064944c - view on LGTM.com

new alerts:

  • 1 for Insecure randomness

@kevinpagtakhan kevinpagtakhan merged commit 03e270e into main Jan 28, 2022
@kevinpagtakhan kevinpagtakhan deleted the AMP-47142-temp-cookie-name branch January 28, 2022 19:07
github-actions bot pushed a commit that referenced this pull request Jan 28, 2022
## [8.16.1](v8.16.0...v8.16.1) (2022-01-28)

### Bug Fixes

* use Date.now() for test cookie value ([#495](#495)) ([03e270e](03e270e))
@github-actions
Copy link

🎉 This PR is included in version 8.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

amp_cookie_test cookie values can contain disallowed characters

4 participants