Browse Source

Updated core, check content encoding for Steffen

markseu 5 years ago
parent
commit
d810f03580
2 changed files with 4 additions and 3 deletions
  1. 1 3
      system/extensions/core.php
  2. 3 0
      system/extensions/update.php

+ 1 - 3
system/extensions/core.php

@@ -68,8 +68,6 @@ class YellowCore {
         $this->system->setDefault("coreLogFile", "yellow.log");
         $troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
         extension_loaded("mbstring") || die("Datenstrom Yellow requires PHP mbstring extension! $troubleshooting");
-        extension_loaded("curl") || die("Datenstrom Yellow requires PHP cURL extension! $troubleshooting");
-        extension_loaded("zip") || die("Datenstrom Yellow requires PHP zip extension! $troubleshooting");
     }
     
     public function __destruct() {
@@ -1833,7 +1831,7 @@ class YellowLookup {
         $pathHome = $this->yellow->system->get("coreContentHomeDir");
         $fileDefault = $this->yellow->system->get("coreContentDefaultFile");
         $fileExtension = $this->yellow->system->get("coreContentExtension");
-        if (substru($fileName, 0, strlenu($pathBase))==$pathBase) {
+        if (substru($fileName, 0, strlenu($pathBase))==$pathBase && mb_check_encoding($fileName, "UTF-8")) {
             $fileName = substru($fileName, strlenu($pathBase));
             $tokens = explode("/", $fileName);
             if (!empty($pathRoot)) {

+ 3 - 0
system/extensions/update.php

@@ -19,6 +19,9 @@ class YellowUpdate {
         $this->yellow->system->setDefault("updateVersionFile", "version.ini");
         $this->yellow->system->setDefault("updateWaffleFile", "waffle.ini");
         $this->yellow->system->setDefault("updateNotification", "none");
+        $troubleshooting = "<a href=\"https://datenstrom.se/yellow/help/troubleshooting\">See troubleshooting</a>.";
+        extension_loaded("curl") || die("Datenstrom Yellow requires PHP cURL extension! $troubleshooting");
+        extension_loaded("zip") || die("Datenstrom Yellow requires PHP zip extension! $troubleshooting");
     }
     
     // Handle request