diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index 3302ba17f..b84f324c7 100755 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -5375,11 +5375,11 @@ class G $res = new stdclass(); if (!extension_loaded('fileinfo')) { - $dtype = explode(".", $filesName); + $dtype = explode(".", strtolower($filesName)); foreach ($allowedTypes as $types => $val) { - if ((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')) { - $allowedDocTypes = substr($val, 2); + if ((preg_match('/^\*\.?[a-zA-Z0-9]{2,15}$/', $val)) || ($val == '*.*')) { + $allowedDocTypes = strtolower(substr($val, 2)); if (($dtype[count($dtype) -1]) == $allowedDocTypes || $allowedDocTypes == '*') { $res->status = true; return $res; @@ -5399,9 +5399,9 @@ class G $docType = explode("/", $finfo_); foreach ($allowedTypes as $types => $val) { - if ((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')) { - $allowedDocTypes = substr($val, 2); - $dtype = explode(".", $filesName); + if ((preg_match('/^\*\.?[a-zA-Z0-9]{2,15}$/', $val)) || ($val == '*.*')) { + $allowedDocTypes = strtolower(substr($val, 2)); + $dtype = explode(".", strtolower($filesName)); switch($allowedDocTypes){ case '*': diff --git a/workflow/engine/methods/inputdocs/inputdocs_Save.php b/workflow/engine/methods/inputdocs/inputdocs_Save.php index 77025d9b5..050c5cb0b 100755 --- a/workflow/engine/methods/inputdocs/inputdocs_Save.php +++ b/workflow/engine/methods/inputdocs/inputdocs_Save.php @@ -92,7 +92,7 @@ try { //Allowed Types has to have this format -> *.pdf, *.docx or *.* to all. $allowedTypes = explode(", ", $aData['INP_DOC_TYPE_FILE']); foreach ($allowedTypes as $types => $val) { - if((preg_match('/^\*\.?[a-z]{2,8}$/', $val)) || ($val == '*.*')){ + if((preg_match('/^\*\.?[a-zA-Z0-9]{2,15}$/', $val)) || ($val == '*.*')){ }else { $message = G::LoadTranslation( 'ID_UPLOAD_ERR_WRONG_ALLOWED_EXTENSION_FORMAT' ); G::SendMessageText( $message, "ERROR" ); diff --git a/workflow/engine/xmlform/cases/cases_AttachInputDocumentGeneral.xml b/workflow/engine/xmlform/cases/cases_AttachInputDocumentGeneral.xml index 21bc9a536..71738baa7 100755 --- a/workflow/engine/xmlform/cases/cases_AttachInputDocumentGeneral.xml +++ b/workflow/engine/xmlform/cases/cases_AttachInputDocumentGeneral.xml @@ -67,7 +67,7 @@ var verifyInfo = function(oForm) for(i=0; i