Merged in bugfix/PMCORE-4148 (pull request #8709)
PMCORE-4148 Validation of uploaded files is currently validating the 'content type' 'application/json' Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -260,7 +260,8 @@ class ValidationUploadedFiles
|
|||||||
* If the size of post data is greater than post_max_size, the $_POST and $_FILES
|
* If the size of post data is greater than post_max_size, the $_POST and $_FILES
|
||||||
* superglobals are empty.
|
* superglobals are empty.
|
||||||
*/
|
*/
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && empty($_POST) && empty($_FILES) && $_SERVER['CONTENT_LENGTH'] > 0) {
|
$notAppJson = isset($_SERVER['CONTENT_TYPE']) && strtolower($_SERVER['CONTENT_TYPE']) !== 'application/json';
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] === 'POST' && empty($_POST) && empty($_FILES) && $_SERVER['CONTENT_LENGTH'] > 0 && $notAppJson) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user