Internal: Exit stylesheet upload if name_stylesheet is not properly defined

pull/2495/head
Yannick Warnier 8 years ago
parent e7b59a8f98
commit a1666c72c6
  1. 4
      main/admin/settings.lib.php

@ -521,6 +521,10 @@ function uploadStylesheet($values, $picture)
$result = false;
// Valid name for the stylesheet folder.
$style_name = api_preg_replace('/[^A-Za-z0-9]/', '', $values['name_stylesheet']);
if (empty($style_name) or is_array($style_name)) {
// The name of the uploaded stylesheet doesn't have the expected format
return $result;
}
$cssToUpload = CSS_UPLOAD_PATH;
// Check if a virtual instance vchamilo is used

Loading…
Cancel
Save