Hey there
We have the same issue and it’s urgent. We get loads of malware uploads with txt files because of this security issue! Could you deliver us a security patch?
Kind regards
Hey Stefan,
ich hab in einem anderem Projekt eine API an die Formulare angebunden und prinzipiell könnte man mit mit diesem Hook sich einklinken und prüfen was für Dateien übermittelt worden sind. Bevor das Plugin überhaupt etwas davon mitbekommt, ist aber jetzt kein fertiger Code aber ein Entwickler weiß was zu machen wäre.
Unsere Kunden haben da bisher noch nicht so das Spam Problem gehabt, daher hab ich es noch nicht für nötig gehalten aktiv einzugreifen.
Grüße
Danny
add_action( 'wp_ajax_nopriv_jobslisting_apply_now', 'job_entry_store_tmp_files', 9);
add_action( 'wp_ajax_jobslisting_apply_now', 'job_entry_store_tmp_files', 9);
function job_entry_store_tmp_files(){
$allowed_file_types = array(
'png' => 'image/png',
'jpe' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpg' => 'image/jpeg',
'gif' => 'image/gif',
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'pdf' => 'application/pdf',
'xlsx' => 'application/vnd.ms-excel',
'docx' => 'application/msword',
);
// Check for files extension and throw error for form
foreach($_FILES as $key => &$file){
// Grab MIME type
$mime_type = mime_content_type($file['tmp_name']);
if (! in_array($mime_type, $allowed_file_types)) {
// File type is NOT allowed.
// Throw Error msg for the the form
}
}
}
-
This reply was modified 3 years, 9 months ago by
support5d.
-
This reply was modified 3 years, 9 months ago by
support5d.