mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-25 20:31:26 -08:00
Merge pull request 'Fix: regex escape pattern' (#438) from JollyDevelopment/pyfedi:jollydev/fix-regex-escape-pattern-00 into main
Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/438
This commit is contained in:
commit
65e67f32dc
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ def admin_federation():
|
|||
remote_url = remote_scan_form.remote_url.data
|
||||
|
||||
# test to make sure its a valid fqdn
|
||||
regex_pattern = '^(https:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$'
|
||||
regex_pattern = '^(https:\\/\\/)(?=.{1,255}$)((.{1,63}\\.){1,127}(?![0-9]*$)[a-z0-9-]+\\.?)$'
|
||||
result = re.match(regex_pattern, remote_url)
|
||||
if result is None:
|
||||
flash(_(f'{remote_url} does not appear to be a valid url. Make sure input is in the form "https://server-name.tld" without trailing slashes or paths.'))
|
||||
|
|
Loading…
Add table
Reference in a new issue