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(api keys): robust to replay of provisioned URL #89

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

jayceslesar
Copy link
Contributor

@jayceslesar jayceslesar commented Jul 22, 2024

We had an issue where if someone made a duplicate request with the steam OID url on the provision_handler endpoint, this would cause the DB to get a new API key but that not being displayed to the user. This fixes it by adding the hash of the OID url as a field in the api_keys table, and upon determining that the hashes of the URL's are the same, a new api key is not provisioned.

Tested by running locally and refreshing the page to confirm the text is as expected and the key is not updated in the DB (nor the hash).

The only way to truly get a new key is to start at the provision url and run through the steam sign in again

masterbase/app.py Outdated Show resolved Hide resolved
@jayceslesar jayceslesar merged commit 355281d into main Jul 22, 2024
3 checks passed
@jayceslesar jayceslesar deleted the fix/oid-url-hash branch July 22, 2024 19:41
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