ht: limit directory size to 64 chars
This commit is contained in:
parent
1aa0d02f5e
commit
938dbe4040
|
@ -16,7 +16,7 @@ function listFsDirs($username) {
|
|||
$absoluteDirs = glob(CONF['ht']['ht_path'] . "/" . $username . "/*/", GLOB_ONLYDIR);
|
||||
$dirs = [];
|
||||
foreach ($absoluteDirs as $absoluteDir)
|
||||
if (preg_match("/^[\p{L}\p{N}_-]+$/u", basename($absoluteDir)))
|
||||
if (preg_match('/^[\p{L}\p{N}_-]{1,64}$/u', basename($absoluteDir)))
|
||||
array_push($dirs, basename($absoluteDir));
|
||||
return $dirs;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue