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

fix(utils): only verify netloc if scheme isn't data #250

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/webexpythonsdk/models/cards/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ def validate_uri(
if not parsed_uri.scheme:
raise URIException("Invalid URI: Missing scheme")

# Check if the URI has a heir-part location
if not parsed_uri.netloc:
# Check if the URI has a heir-part location if scheme isn't "data"
if parsed_uri.scheme != "data" and not parsed_uri.netloc:
raise URIException("Invalid URI: Missing heir part location")

# Return if every check is passed
Expand Down