File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 9090 $ v_custom_doc_root = realpath ($ data [$ v_domain ]['CUSTOM_DOCROOT ' ]) . DIRECTORY_SEPARATOR ;
9191
9292if (!empty ($ v_custom_doc_root ) &&
93- false !== preg_match ('/\/home\/ ' .$ v_username .'\/web\/([[:alnum:]].*)\/public_html\/([[:alnum:]].*)?/ ' , $ v_custom_doc_root , $ matches ) ) {
93+ false !== preg_match ('/\/home\/ ' .$ v_username .'\/web\/([[:alnum:]].*?)\/public_html\/([[:alnum:]].*)?/ ' , $ v_custom_doc_root , $ matches ) ) {
94+ // Regex for extracting target web domain and custom document root. Regex test: https://regex101.com/r/2CLvIF/1
9495
9596 if (!empty ($ matches [1 ]))
9697 $ v_custom_doc_domain = $ matches [1 ];
9798
9899 if (!empty ($ matches [2 ]))
99100 $ v_custom_doc_folder = rtrim ($ matches [2 ], '/ ' );
100-
101+
101102 if ($ v_custom_doc_domain && !in_array ($ v_custom_doc_domain , $ user_domains )) {
102103 $ v_custom_doc_domain = '' ;
103104 $ v_custom_doc_folder = '' ;
You can’t perform that action at this time.
0 commit comments