Check mbstring
This commit is contained in:
		| @ -243,6 +243,7 @@ function downloadFile(event) { | |||||||
|  |  | ||||||
| function error(data, statut, error) { | function error(data, statut, error) { | ||||||
|   lock = 0; |   lock = 0; | ||||||
|  |   console.log(data.status + " " + data.statusText); | ||||||
|   console.log(data); |   console.log(data); | ||||||
|   //$('body').html(data['status'] + ' ' + error + '<br>' + data['responseText']); |   //$('body').html(data['status'] + ' ' + error + '<br>' + data['responseText']); | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -18,6 +18,12 @@ $file = $_FILES["file"]; | |||||||
|  |  | ||||||
| $name = basename($file["name"]); | $name = basename($file["name"]); | ||||||
|  |  | ||||||
|  |  | ||||||
|  | if (! extension_loaded('mbstring')) { | ||||||
|  | 	header("HTTP/1.1 400 Bad encode"); | ||||||
|  | 	exit(); | ||||||
|  | } | ||||||
|  |  | ||||||
| if(! mb_check_encoding($name)) { | if(! mb_check_encoding($name)) { | ||||||
| 	header("HTTP/1.1 400 Bad encode"); | 	header("HTTP/1.1 400 Bad encode"); | ||||||
| 	exit(); | 	exit(); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 lionel
					lionel