Added security with files and folders

This commit is contained in:
Chouchen 2011-02-28 13:33:13 +00:00
parent 5c98644137
commit bea3c9d3db
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class ShortURL extends XMLSQL{
}
public function shortThisUrl($longUrl, $shortName){
if($this->pkAlreadyExists($shortName, 'url')){
if($this->pkAlreadyExists($shortName, 'url') || file_exists($shortName)){
return self::STATE_ALREADY_EXIST;
}else{
return $this->insert(array('url'=>$longUrl,'hit'=>'0'), rawurlencode($shortName))->into('url')->query();