We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 544b332 + d53bf15 commit e66f94cCopy full SHA for e66f94c
pkg_resources/__init__.py
@@ -1604,14 +1604,15 @@ def _validate_resource_path(path):
1604
os.path.pardir in path.split(posixpath.sep)
1605
or posixpath.isabs(path)
1606
or ntpath.isabs(path)
1607
+ or path.startswith("\\")
1608
)
1609
if not invalid:
1610
return
1611
1612
msg = "Use of .. or absolute path in a resource path is not allowed."
1613
1614
# Aggressively disallow Windows absolute paths
- if ntpath.isabs(path) and not posixpath.isabs(path):
1615
+ if (path.startswith("\\") or ntpath.isabs(path)) and not posixpath.isabs(path):
1616
raise ValueError(msg)
1617
1618
# for compatibility, warn; in future
0 commit comments