Skip to content

Commit

Permalink
reformat long line comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joostd committed Apr 3, 2024
1 parent 44eea51 commit f64de37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions fido2/rpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def verify_rp_id(rp_id: str, origin: str) -> bool:
url = urlparse(origin)
host = url.hostname
# Note that Webauthn requires a secure context, i.e. an origin with https scheme.
# However, most browsers also treat http://localhost as a secure context.
# See https://groups.google.com/a/chromium.org/g/blink-dev/c/RC9dSw-O3fE/m/E3_0XaT0BAAJ
if url.scheme != "https" and (url.scheme, hostname) != ("http", "localhost"):
# However, most browsers also treat http://localhost as a secure context. See
# https://groups.google.com/a/chromium.org/g/blink-dev/c/RC9dSw-O3fE/m/E3_0XaT0BAAJ
if url.scheme != "https" and (url.scheme, host) != ("http", "localhost"):
return False
if host == rp_id:
return True
Expand Down
4 changes: 2 additions & 2 deletions fido2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ def verify_app_id(app_id: str, origin: str) -> bool:
url = urlparse(app_id)
hostname = url.hostname
# Note that FIDO U2F requires a secure context, i.e. an origin with https scheme.
# However, most browsers also treat http://localhost as a secure context.
# See https://groups.google.com/a/chromium.org/g/blink-dev/c/RC9dSw-O3fE/m/E3_0XaT0BAAJ
# However, most browsers also treat http://localhost as a secure context. See
# https://groups.google.com/a/chromium.org/g/blink-dev/c/RC9dSw-O3fE/m/E3_0XaT0BAAJ
if url.scheme != "https" and (url.scheme, hostname) != ("http", "localhost"):
return False
if not hostname:
Expand Down

0 comments on commit f64de37

Please sign in to comment.