Changeset 13527 for trunk/i.php


Ignore:
Timestamp:
Mar 10, 2012, 10:34:48 PM (12 years ago)
Author:
plg
Message:

feature 414 (yes, a 6 years old request): ability to define the list of
permitted characters in file/directory names for synchronization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/i.php

    r13444 r13527  
    195195
    196196  $req = ltrim($req, '/');
    197   !preg_match('#[^a-zA-Z0-9/_.-]#', $req) or ierror('Invalid chars in request', 400);
    198 
     197
     198  foreach (preg_split('#/+#', $req) as $token)
     199  {
     200    preg_match($conf['sync_chars_regex'], $token) or ierror('Invalid chars in request', 400);
     201  }
     202 
    199203  $page['derivative_path'] = PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$req;
    200204
Note: See TracChangeset for help on using the changeset viewer.