mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 13:15:55 +00:00
public/cached_url: forbid sending files with extensions
This commit is contained in:
@@ -1204,6 +1204,9 @@ class Handler_Public extends Handler {
|
|||||||
function cached_url() {
|
function cached_url() {
|
||||||
list ($cache_dir, $filename) = explode("/", $_GET["file"], 2);
|
list ($cache_dir, $filename) = explode("/", $_GET["file"], 2);
|
||||||
|
|
||||||
|
// we do not allow files with extensions at the moment
|
||||||
|
$filename = str_replace(".", "", $filename);
|
||||||
|
|
||||||
$cache = new DiskCache($cache_dir);
|
$cache = new DiskCache($cache_dir);
|
||||||
|
|
||||||
if ($cache->exists($filename)) {
|
if ($cache->exists($filename)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user