Require https redirect URIs in production and staging - #283
Merged
Conversation
lisad
approved these changes
Aug 13, 2026
aaronjae22
force-pushed
the
feat/production-https-redirect-policy
branch
from
August 14, 2026 17:32
0f7bf8d to
6c17c5b
Compare
aaronjae22
force-pushed
the
feat/production-https-redirect-policy
branch
from
August 14, 2026 17:43
6c17c5b to
ade5bf4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #279 (PR 3/3)
Sets
ALLOWED_REDIRECT_URI_SCHEMES = ['https']for production and staging.Prod and stg has been inheriting django-oauth-toolkit's default which accepts
http://redirect URIs.The other two changes exist due the changes made on that one:
The form on
oauth/forms.pypreviously hardcoded "Each URI must start with http:// or https://".After the policy change that message becomes wrong in production; a user would follow it and then hit DOT's raw
redirect uri URI Validation error. invalid_schemeon save. It now derives both the accepted schemes and the message text from the same setting, so the friendly message is the correct one in every environment.LOLA/spec
§6.1: "The destination MUST fetch data using HTTPS, not HTTP." That MUST sits on the destination, but a source handing authorization codes to
http://callbacks undermines it. §5.1 listsredirect_uriamong the authorization-request parameters the source validates.