diff options
-rw-r--r-- | it_url.class | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/it_url.class b/it_url.class index 65a3954..b2ebe05 100644 --- a/it_url.class +++ b/it_url.class @@ -352,6 +352,9 @@ function get_cache($p = array()) { $p += array('timeout'=>10, 'maxage'=>86400, 'cleanbefore'=>7200, 'safety'=>1, 'cachedir'=>$GLOBALS['ULTRAHOME']."/var/urlcache", 'it_error'=>array()); + if ($p['timeout'] > 600) + it::error("suspiciously high timeout"); + $path = it_url::get_cache_filename($p); @mkdir(dirname($path)); $age = file_exists($path) ? (time() - @filemtime($path)) : 0; |