diff options
author | Urban Müller | 2007-10-08 15:02:44 +0000 |
---|---|---|
committer | Urban Müller | 2007-10-08 15:02:44 +0000 |
commit | 46fb3f3c3f803c27a6270f21f33aa180da5ec22a (patch) | |
tree | 5b48ddda9620b25fcfaac7070d274f4eae31ca53 /it_url.class | |
parent | e402c1d2491cbac0243f0118c79c1c16f99f66a6 (diff) | |
download | itools-46fb3f3c3f803c27a6270f21f33aa180da5ec22a.tar.gz itools-46fb3f3c3f803c27a6270f21f33aa180da5ec22a.tar.bz2 itools-46fb3f3c3f803c27a6270f21f33aa180da5ec22a.zip |
temporary timeout validation
Diffstat (limited to 'it_url.class')
-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; |