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

Convert string to bytes if needed #1003

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

dannysauer
Copy link
Contributor

When django-storages is used from an app which is configured by env variables
fed into dynaconf (or probably other situations), it's not easy to directly
coerce a string representation of the signing key into a bytes-like object; it
comes in as a string. This detects that situation and encodes the string.

When django-storages is used from an app which is configured by env variables
fed into dynaconf (or probably other situations), it's not easy to directly
coerce a string representation of the signing key into a bytes-like object; it
comes in as a string.  This detects that situation and encodes the string.
@jschneier jschneier merged commit e2dea07 into jschneier:master Apr 20, 2021
@jschneier
Copy link
Owner

Thanks, looks great. Hopefully merging kicks CI.

@jschneier
Copy link
Owner

Guess we could have used Django's force_bytes or similar.

@dannysauer
Copy link
Contributor Author

My Django skills are very weak. :)

mlazowik pushed a commit to qedsoftware/django-storages that referenced this pull request Mar 9, 2022
When django-storages is used from an app which is configured by env variables
fed into dynaconf (or probably other situations), it's not easy to directly
coerce a string representation of the signing key into a bytes-like object; it
comes in as a string.  This detects that situation and encodes the string.
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.

2 participants