Skip to content
Snippets Groups Projects
Commit eb5b8176 authored by root's avatar root
Browse files

#Fixes::158429927::Chaitanya N::Unrestricted file upload in company logo issue is fixed

parent 9746670b
No related branches found
No related tags found
No related merge requests found
......@@ -659,7 +659,7 @@ class Vtiger_Functions {
$saveimage = false;
}
//Check if the filename starts with the '.' character and it is not accepted those files.
//Checking the path of the file
if ($saveimage) {
$fileExtensionPath = pathinfo($file_details['name'], PATHINFO_EXTENSION);
if (!in_array(strtolower($fileExtensionPath), $allowedImageFormats)) {
......@@ -667,6 +667,7 @@ class Vtiger_Functions {
}
}
//checking the filename has dot character
if ($saveimage) {
$firstCharacter = $file_details['name'][0];
if ($firstCharacter == '.') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment