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

OAuth1: Allow IPv6 addresses being parsed by signature #818

Merged
merged 5 commits into from Sep 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion oauthlib/oauth1/rfc5849/signature.py
Expand Up @@ -173,7 +173,7 @@ def base_string_uri(uri: str, host: str = None) -> str:
if ':' in netloc:
dasm marked this conversation as resolved.
Show resolved Hide resolved
# Contains a colon ":", so try to parse as "host:port"

hostname, port_str = netloc.split(':', 1)
hostname, port_str = netloc.rsplit(':', 1)

if len(hostname) == 0:
raise ValueError('missing host') # error: netloc was ":port" or ":"
Expand Down