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

Fix code scanning alert no. 16: Client-side URL redirect #3

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

universalbit-dev
Copy link
Owner

Fixes https://github.com/universalbit-dev/iD/security/code-scanning/16

To fix the problem, we need to ensure that the hash value is validated against a list of authorized redirects before using it in window.location.replace. This can be achieved by maintaining a list of allowed hashes and checking if the hash value is in this list before performing the redirection.

  1. Create a list of authorized hashes.
  2. Check if the hash value is in the list of authorized hashes.
  3. Only perform the redirection if the hash value is authorized.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant