1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 20:05:55 +00:00

DiskCache: more strict checking for input filenames, getUrl() is no longer static

This commit is contained in:
Andrew Dolgov
2019-08-14 09:49:18 +03:00
parent 65450f8a2b
commit 3c075bfd21
5 changed files with 16 additions and 16 deletions

View File

@@ -594,6 +594,10 @@
}
}
function clean_filename($filename) {
return basename(preg_replace("/\.\.|[\/\\\]/", "", $filename));
}
function make_password($length = 12) {
$password = "";
$possible = "0123456789abcdfghjkmnpqrstvwxyzABCDFGHJKMNPQRSTVWXYZ*%+^";