Skip to content

Commit

Permalink
URL substring sanitization
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Jun 20, 2024
1 parent cd798a4 commit cc2859f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion leafmap/maplibregl.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ def __init__(
]
if isinstance(style, str):

if "api.maptiler.com" in style and "key=None" in style:
style = style.strip().lower()
if style.startswith("https://api.maptiler.com") and style.endswith(

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

The string
https://api.maptiler.com
may be at an arbitrary position in the sanitized URL.
"key=None"
):
style = "dark-matter"

if style.lower() in carto_basemaps:
Expand Down

0 comments on commit cc2859f

Please sign in to comment.