Просмотр исходного кода

Improve regex to make sure it is valid due to namespaces

Jaap Marcus 4 лет назад
Родитель
Сommit
145c459a72
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 1
      web/add/webapp/index.php

+ 1 - 0
CHANGELOG.md

@@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file.
 
 - Resolve issue with double ENFORCE_SUBDOMAIN_OWNERSHIP keys in hestia.conf
 - Resolve issue with create new user during install in some cases #2000
+- Fix an issue with Quick Install apps named Test123 
 
 ## [1.4.7] - Service release 
 

+ 1 - 1
web/add/webapp/index.php

@@ -91,7 +91,7 @@ if(!empty($installer)) {
     $v_web_apps = array();
     foreach($appInstallers as $app){
         $hestia = new \Hestia\System\HestiaApp();
-        if( preg_match('/Installers\/([a-zA-Z0-9].*)\/([a-zA-Z0-9].*).php/', $app, $matches)){
+        if( preg_match('/Installers\/([a-zA-Z][a-zA-Z0,9].*)\/([a-zA-Z][a-zA-Z0,9].*).php/', $app, $matches)){
             if ($matches[1] != "Resources"){
                 $app_installer_class = '\Hestia\WebApp\Installers\\'.$matches[1].'\\' . $matches[1] . 'Setup';
                 $app_installer = new $app_installer_class($v_domain, $hestia);