From 46fb3f3c3f803c27a6270f21f33aa180da5ec22a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Mon, 8 Oct 2007 15:02:44 +0000 Subject: temporary timeout validation --- it_url.class | 3 +++ 1 file changed, 3 insertions(+) (limited to 'it_url.class') 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; -- cgit v1.2.3