Browse Source

Added security with files and folders

Shikiryu 8 years ago
parent
commit
d9ddc18a5b
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      class/ShortURL.php

+ 1
- 1
class/ShortURL.php View File

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

Loading…
Cancel
Save