mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-10-30 21:52:00 +01:00
feature 414 (yes, a 6 years old request): ability to define the list of
permitted characters in file/directory names for synchronization. git-svn-id: http://piwigo.org/svn/trunk@13527 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
1 parent
b1c58f59ca
commit
e0f6d5d6a7
3 files changed
+10
-3
No files matched your search
@@ -194,8 +194,12 @@ function parse_request()
|
||||
}
|
||||
|
||||
$req = ltrim($req, '/');
|
||||
!preg_match('#[^a-zA-Z0-9/_.-]#', $req) or ierror('Invalid chars in request', 400);
|
||||
|
||||
foreach (preg_split('#/+#', $req) as $token)
|
||||
{
|
||||
preg_match($conf['sync_chars_regex'], $token) or ierror('Invalid chars in request', 400);
|
||||
}
|
||||
|
||||
$page['derivative_path'] = PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$req;
|
||||
|
||||
$pos = strrpos($req, '.');
|
||||
|
||||
Reference in new issue
Block a user