some more stupid php5.2 fixes

This commit is contained in:
Ralf Becker 2006-12-22 06:33:01 +00:00
parent 525abe5da6
commit 6584ab6487
2 changed files with 4 additions and 3 deletions

View File

@ -625,7 +625,8 @@
$data = array ();
}
if (substr ($data['string'], 0, 1) == "\\" || strstr ($data['string'], "..") || strstr ($data['string'], "\\..") || strstr ($data['string'], ".\\."))
if (substr ($data['string'], 0, 1) == '\\' || strpos($data['string'], '..') !== false ||
strpos($data['string'], '\\..') !== false || strpos($data['string'], '.\\.') !== false)
{
return False;
}

View File

@ -1730,8 +1730,8 @@
}
/* We don't allow /'s in dir names, of course */
if (strstr ($p->fake_name,'/'))
{//echo "strstr('$p->fake_name','/')";
if (strpos ($p->fake_name,'/') !== false)
{
return False;
}