[Install] Filter Directory name
这个提交包含在:
		
							父节点
							
								
									b281e9c62e
								
							
						
					
					
						当前提交
						e424ddbfda
					
				
					共有  1 个文件被更改,包括 8 次插入 和 2 次删除
				
			
		|  | @ -9,7 +9,7 @@ class Core { | ||||||
| 		$counter = 0; | 		$counter = 0; | ||||||
| 
 | 
 | ||||||
| 		// Validate the hostname
 | 		// Validate the hostname
 | ||||||
| 		if(isset($data['hostname']) AND !empty($data['hostname'])) { | 		if(isset($data['hostname']) AND !empty($data['hostname']) AND filter_var($data['hostname'], FILTER_SANITIZE_URL)) { | ||||||
| 			$counter++; | 			$counter++; | ||||||
| 		} | 		} | ||||||
| 		// Validate the username
 | 		// Validate the username
 | ||||||
|  | @ -25,8 +25,14 @@ class Core { | ||||||
| 			$counter++; | 			$counter++; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		if(!preg_match("~0-9A-Za-z-/+~", $data['directory'])) { | ||||||
|  | 			// pass
 | ||||||
|  | 		} else { | ||||||
|  | 			return false; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		// Check if all the required fields have been entered
 | 		// Check if all the required fields have been entered
 | ||||||
| 		if($counter == '3') { | 		if($counter == '4') { | ||||||
| 			return true; | 			return true; | ||||||
| 		} | 		} | ||||||
| 		else { | 		else { | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用