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

chore: Refactor authentication key generation #2443

Merged
merged 3 commits into from
Jul 1, 2024
Merged

chore: Refactor authentication key generation #2443

merged 3 commits into from
Jul 1, 2024

Conversation

ogabrielluiz
Copy link
Contributor

Refactor the ensure_valid_key function in utils.py to improve the generation of a valid key for authentication. The function now checks if the input key is too short and generates a random key if necessary. Additionally, the key is now URL-safe base64-encoded. This change enhances the security and reliability of the authentication process.

Refactor the `ensure_valid_key` function in `utils.py` to improve the generation of a valid key for authentication. The function now checks if the input key is too short and generates a random key if necessary. Additionally, the key is now URL-safe base64-encoded. This change enhances the security and reliability of the authentication process.
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jun 30, 2024
@dosubot dosubot bot added enhancement New feature or request python Pull requests that update Python code labels Jun 30, 2024
@ogabrielluiz ogabrielluiz enabled auto-merge June 30, 2024 14:46
@ogabrielluiz ogabrielluiz disabled auto-merge July 1, 2024 16:26
@ogabrielluiz ogabrielluiz merged commit f8cbd1e into dev Jul 1, 2024
4 checks passed
@ogabrielluiz ogabrielluiz deleted the fix_fernet branch July 1, 2024 16:26
ogabrielluiz added a commit that referenced this pull request Jul 1, 2024
Refactor the `ensure_valid_key` function in `utils.py` to improve the generation of a valid key for authentication. The function now checks if the input key is too short and generates a random key if necessary. Additionally, the key is now URL-safe base64-encoded. This change enhances the security and reliability of the authentication process.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant