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 construction of cookie using user supplied input #12808 #13029

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

KumarVivekPathak
Copy link

Summary

This PR addresses the code scanning alert in issue #12808 by ensuring that the visitor_id cookie value is validated before use.

The validation ensures:

  • The visitor_id cookie is a valid hex UUID by attempting to parse it with UUID(visitor_id, version=4).
  • If the validation fails or the cookie does not exist, a new visitor_id is generated using uuid4().hex.
  • The validated or newly generated visitor_id is then set in the response.

@github-actions github-actions bot added the DEV: backend Python, databases, networking, filesystem... label Jan 24, 2025
@rtibbles rtibbles self-assigned this Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants