Skip to content

Commit

Permalink
fix: Allow ampersands in templated URLs for module provider, allowing…
Browse files Browse the repository at this point in the history
… query string delimiter to not be escaped

Issue #546
  • Loading branch information
MatthewJohn committed Oct 22, 2024
1 parent 9705639 commit c688aa2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions terrareg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ def update_repo_clone_url_template(self, repo_clone_url_template):
# TypeError is thrown when port is None when trying to convert to an int
pass

repo_clone_url_template = urllib.parse.quote(repo_clone_url_template, safe=r'\{\}/:@%?=')
repo_clone_url_template = urllib.parse.quote(repo_clone_url_template, safe=r'\{\}/:@%?=&')

original_value = self._get_db_row()['repo_clone_url_template']
if original_value != repo_clone_url_template:
Expand Down Expand Up @@ -2878,7 +2878,7 @@ def update_repo_browse_url_template(self, repo_browse_url_template):
# TypeError is thrown when port is None when trying to convert to an int
pass

repo_browse_url_template = urllib.parse.quote(repo_browse_url_template, safe=r'\{\}/:@%?=')
repo_browse_url_template = urllib.parse.quote(repo_browse_url_template, safe=r'\{\}/:@%?=&')

original_value = self._get_db_row()['repo_browse_url_template']
if original_value != repo_browse_url_template:
Expand Down Expand Up @@ -2939,7 +2939,7 @@ def update_repo_base_url_template(self, repo_base_url_template):
# TypeError is thrown when port is None when trying to convert to an int
pass

repo_base_url_template = urllib.parse.quote(repo_base_url_template, safe=r'\{\}/:@%?=')
repo_base_url_template = urllib.parse.quote(repo_base_url_template, safe=r'\{\}/:@%?=&')

original_value = self._get_db_row()['repo_base_url_template']
if original_value != repo_base_url_template:
Expand Down

0 comments on commit c688aa2

Please sign in to comment.