From bea3c9d3db8cc8c85dbd0d36bd9409c07dcb9b90 Mon Sep 17 00:00:00 2001 From: Chouchen Date: Mon, 28 Feb 2011 13:33:13 +0000 Subject: [PATCH] Added security with files and folders --- trunk/class/ShortURL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/class/ShortURL.php b/trunk/class/ShortURL.php index 71237fa..58c16ed 100644 --- a/trunk/class/ShortURL.php +++ b/trunk/class/ShortURL.php @@ -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();