Skip to content

Commit a1cb498

Browse files
committed
rename xss var
1 parent 86e4713 commit a1cb498

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dynamic_breadcrumbs/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def validate_path(path):
2929
logger.warning("Invalid path type provided: %s", type(path))
3030
return ""
3131

32-
if app_settings.PATH_ALPHANUMERIC:
32+
if app_settings.PATH_XSS_SAFE_MODE:
3333
# Ensure the path contains only alphanumeric characters, dashes, underscores, and slashes
3434
if not re.match(r'^[a-zA-Z0-9_\-/]*$', path):
3535
logger.warning("Invalid path provided: %s", path)

tests/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ def test_validate_path_not_string_returns_empty_string(self):
3434
self.assertEqual(result, "")
3535

3636
def test_validate_path_check_alphanumeric_returns_empty_string(self):
37-
app_settings.PATH_ALPHANUMERIC=True
37+
app_settings.PATH_XSS_SAFE_MODE=True
3838
path="*%#$@@#*(/%#%_)*"
3939

4040
result = validate_path(path=path)
4141

4242
self.assertEqual(result, "")
4343

4444
def test_validate_path_non_check_alphanumeric_returns_path(self):
45-
app_settings.PATH_ALPHANUMERIC=False
45+
app_settings.PATH_XSS_SAFE_MODE=False
4646
path="*%#$@@#*(/%#%_)*"
4747

4848
result = validate_path(path=path)

0 commit comments

Comments
 (0)