]> saetta.ns0.it Git - zakform/cgi/commitdiff
File mime validation overwrote size validation. develop
authorAndrea Zagli <azagli@libero.it>
Sat, 25 Feb 2023 09:53:04 +0000 (10:53 +0100)
committerAndrea Zagli <azagli@libero.it>
Sat, 25 Feb 2023 09:53:04 +0000 (10:53 +0100)
src/formelementvalidatorfile.c

index 8c66322628342898c9a7b8580e521e336a82ad66..cea7c289773c0ab79bb48e3f3962de73174bf9a4 100644 (file)
@@ -412,7 +412,10 @@ zak_form_cgi_form_element_validator_file_validate (ZakFormElementValidator *vali
                                                                        mime = g_strdup (cgi_file->content_type);
                                                                }
 
-                                                       ret = zak_form_cgi_form_element_validator_file_mime_is_valid (ZAK_FORM_CGI_FORM_ELEMENT_VALIDATOR_FILE (validator), mime);
+                                                       if (!zak_form_cgi_form_element_validator_file_mime_is_valid (ZAK_FORM_CGI_FORM_ELEMENT_VALIDATOR_FILE (validator), mime))
+                                                               {
+                                                                       ret = FALSE;
+                                                               }
                                                }
                                }
                        else if (priv->size_min > 0)