summaryrefslogtreecommitdiff
path: root/tests/unit/test_utils.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-12-20 14:24:17 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-12-20 14:24:17 -0800
commit702e41dd0674e76b292d9ea4f559c86f0a99edfe (patch)
tree7af846efbabb09e7941d599503ae658f37dea6f7 /tests/unit/test_utils.py
parentccefe80f150eb50176e52b8c9f5b4d0bdb4f5b43 (diff)
downloadgitlab-jlvillal/leave_dot.tar.gz
fix: stop encoding '.' to '%2E'jlvillal/leave_dot
Forcing the encoding of '.' to '%2E' causes issues. It also goes against the RFC: https://datatracker.ietf.org/doc/html/rfc3986.html#section-2.3 From the RFC: For consistency, percent-encoded octets in the ranges of ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should not be created by URI producers... Closes #1006 Related #1356 Related #1561 BREAKING CHANGE: stop encoding '.' to '%2E'. This could potentially be a breaking change for users who have incorrectly configured GitLab servers which don't handle period '.' characters correctly.
Diffstat (limited to 'tests/unit/test_utils.py')
-rw-r--r--tests/unit/test_utils.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py
index dbe0838..706285e 100644
--- a/tests/unit/test_utils.py
+++ b/tests/unit/test_utils.py
@@ -30,13 +30,3 @@ def test_clean_str_id():
src = "foo%bar/baz/"
dest = "foo%25bar%2Fbaz%2F"
assert dest == utils.clean_str_id(src)
-
-
-def test_sanitized_url():
- src = "http://localhost/foo/bar"
- dest = "http://localhost/foo/bar"
- assert dest == utils.sanitized_url(src)
-
- src = "http://localhost/foo.bar.baz"
- dest = "http://localhost/foo%2Ebar%2Ebaz"
- assert dest == utils.sanitized_url(src)