Skip to content
Snippets Groups Projects
Commit ebc7b859 authored by Davide's avatar Davide
Browse files

modified regex for url validation

parent 42f1c343
No related branches found
No related tags found
5 merge requests!1730Development,!1724Development,!1723Development,!1712Development,!1701Resolve "settings for blacklisting pages"
...@@ -290,8 +290,8 @@ class SettingsController extends Controller ...@@ -290,8 +290,8 @@ class SettingsController extends Controller
$blacklist = substr($blacklist, 0, stripos($blacklist, '/')); $blacklist = substr($blacklist, 0, stripos($blacklist, '/'));
} }
$regexUrl = '#^(\*\.)?[a-z0-9.]*$#'; $regexUrl = '#^[a-z0-9]+(\.[a-z0-9]{2,})+$#';
if(preg_match($regexUrl, $blacklist) == 1){ if(preg_match($regexUrl, $blacklist) === 1){
$path = \Request::path(); $path = \Request::path();
$cookiePath = "/" . substr($path, 0, strpos($path, "meta/") + 5); $cookiePath = "/" . substr($path, 0, strpos($path, "meta/") + 5);
......
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