Skip to content

Commit c6e9894

Browse files
author
Till Brehm
committed
Improved path regex in system.inc.php
1 parent 5192dbc commit c6e9894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/classes/system.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ function checkpath($path) {
851851

852852
//* We allow only some characters in the path
853853
// * is allowed, for example it is part of wildcard certificates/keys: *.example.com.crt
854-
if(!preg_match('@^/[-a-zA-Z0-9_/.*~]{1,}$@', $path)) return false;
854+
if(!preg_match('@^/[-a-zA-Z0-9_/.*]{1,}[~]?$@', $path)) return false;
855855

856856
//* Check path for symlinks
857857
$path_parts = explode('/', $path);

0 commit comments

Comments
 (0)