mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
realm_filters: Allows more use of & and friends in URLs.
We had some excessively tight rules about what characters were allowed, which in particular prevented using `?foo=bar&baz=quux` structures in the realm filters URLs. Fixes #12239.
This commit is contained in:
@@ -594,7 +594,7 @@ def filter_pattern_validator(value: str) -> None:
|
||||
raise ValidationError(error_msg)
|
||||
|
||||
def filter_format_validator(value: str) -> None:
|
||||
regex = re.compile(r'^([\.\/:a-zA-Z0-9#_?=-]+%\(([a-zA-Z0-9_-]+)\)s)+[a-zA-Z0-9_-]*$')
|
||||
regex = re.compile(r'^([\.\/:a-zA-Z0-9#_?=&-]+%\(([a-zA-Z0-9_-]+)\)s)+[/a-zA-Z0-9#_?=&-]*$')
|
||||
|
||||
if not regex.match(value):
|
||||
raise ValidationError(_('Invalid URL format string.'))
|
||||
|
||||
Reference in New Issue
Block a user