그누보드 파일 삭제 취약점 17-282 수정
This commit is contained in:
1 parent
617dfbf0e2
commit
e6a3df6f08
1 file changed
+2
-2
@@ -5,9 +5,9 @@ if(!function_exists('ft_nonce_is_valid')){
|
||||
include_once('../editor.lib.php');
|
||||
}
|
||||
|
||||
$filesrc = isset($_POST["filesrc"]) ? $_POST["filesrc"] : '';
|
||||
$filesrc = isset($_POST["filesrc"]) ? preg_replace("/[ #\&\+\-%@=\/\\\:;,\'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/", "", $_POST["filesrc"]) : '';
|
||||
|
||||
if( !$filesrc ){
|
||||
if( !$filesrc || ! preg_match('=^[^/?*;:{}\\\\]+\.[^/?*;:{}\\\\]+$=', $filesrc) || ! preg_match('/\.(gif|jpe?g|bmp|png)$/i', $filesrc) ){
|
||||
die( false );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user