fix(oauth1): correct protocol name in InsecureTransportError description - #919
Merged
lepture merged 1 commit intoAug 11, 2026
Conversation
The OAuth1 InsecureTransportError carried the description string from its OAuth2 counterpart, so an OAuth 1.0a client hitting an http:// endpoint was told "OAuth 2 MUST utilize https." The identical string is still present in authlib/oauth2/rfc6749/errors.py, where it belongs. No behaviour change.
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.
Noticed this while reading through #627 — the OAuth1 InsecureTransportError
carries the description string from its OAuth2 counterpart, so its message
reads "OAuth 2 MUST utilize https." An OAuth 1.0a client hitting an http://
endpoint gets told it must use HTTPS for a protocol it isn't even using.
It's in authlib/oauth1/rfc5849/errors.py line 29. The same string is in
authlib/oauth2/rfc6749/errors.py line 59, which is where it belongs — this
only touches the OAuth1 copy, so the OAuth2 one is untouched. Nothing asserts
the old text anywhere, and it's only a description, so behaviour is the same.
tests/core and tests/flask/test_oauth1 both pass, ruff is clean.
#627 also asks about dropping the transport check from OAuth1 altogether.
That one's a behaviour change so I left it alone — happy to look at it
separately if you want it, but this bit seemed worth fixing on its own
either way.