summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2022-10-26 16:41:47 +0200
committerUrban Müller2022-10-26 16:41:47 +0200
commit11e1af746b89e76eed40d1dd15f986964786ef2b (patch)
tree9823a342ec967605808f4d37e262452f942798ec
parentf71e0793f686dee0ff7acfed45e58cef4849b3e4 (diff)
downloaditools-11e1af746b89e76eed40d1dd15f986964786ef2b.tar.gz
itools-11e1af746b89e76eed40d1dd15f986964786ef2b.tar.bz2
itools-11e1af746b89e76eed40d1dd15f986964786ef2b.zip
prevent ever changing filenames to changing Bearer tokens
-rw-r--r--it_url.class3
1 files changed, 2 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index b41a1f3..1c1a21c 100644
--- a/it_url.class
+++ b/it_url.class
@@ -554,9 +554,10 @@ static function get_cache_dir($p)
static function get_cache_filename($p)
{
if (!is_array($p))
- $p = array('url'=>$p);
+ $p = array('url' => $p);
$p['cachedir'] = it_url::get_cache_dir($p);
+ unset($p['headers']['Authorization']); # prevent ever changing filenames to changing Bearer tokens
$filename = $p['cachefilename'] ?: md5(T_lang() . T_defaultlang() . $p['url'] . ($p['headers'] ? serialize($p['headers']) : "") . ($p['data'] ? serialize($p['data']) : ""));
return $p['cachedir'] . "/" . substr($filename, 0, 2) . "/$filename";