Skip to content

Commit 371590e

Browse files
author
Till Brehm
committed
Fixed #4863 URL Redirect doesn't accept #anchors
1 parent 3a8ee9e commit 371590e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

interface/web/sites/form/web_childdomain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
'datatype' => 'VARCHAR',
126126
'formtype' => 'TEXT',
127127
'validators' => array ( 0 => array ( 'type' => 'REGEX',
128-
'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
128+
'regex' => '@^(([\.]{0})|((ftp|https?|\[scheme\])://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)(?:#\S*)?|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
129129
'errmsg'=> 'redirect_error_regex'),
130130
),
131131
'default' => '',

interface/web/sites/form/web_vhost_domain.tform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@
396396
'redirect_path' => array (
397397
'datatype' => 'VARCHAR',
398398
'validators' => array ( 0 => array ( 'type' => 'REGEX',
399-
'regex' => '@^(([\.]{0})|((ftp|https?)://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)|(\[scheme\]://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?\~!:%]*(\?\S+)?)?)?)|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
399+
'regex' => '@^(([\.]{0})|((ftp|https?|\[scheme\])://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?\~!:%]*(\?\S+)?)?)?)(?:#\S*)?|(/(?!.*\.\.)[\w/_\.\-]{1,255}/))$@',
400400
'errmsg'=> 'redirect_error_regex'),
401401
),
402402
'formtype' => 'TEXT',

0 commit comments

Comments
 (0)