diff --git a/data/web/inc/ajax/regex_validation.php b/data/web/inc/ajax/regex_validation.php deleted file mode 100644 index 6bd8c931..00000000 --- a/data/web/inc/ajax/regex_validation.php +++ /dev/null @@ -1,25 +0,0 @@ - $regex) { - if (empty($regex) || substr($regex, 0, 1) == "#") { - continue; - } - if (empty($regex) || substr($regex, 0, 1) != "/") { - echo json_encode(array('type' => 'danger', 'msg' => 'Line ' . ($line + 1) . ': Invalid regex')); - exit(); - } - if (@preg_match($regex, 'Lorem Ipsum') === false) { - echo json_encode(array('type' => 'danger', 'msg' => 'Line ' . ($line + 1) . ': Invalid regex "' . $regex . '"')); - exit(); - } - } - echo json_encode(array('type' => 'success', 'msg' => $lang['add']['validation_success'])); -} -?> diff --git a/data/web/js/site/admin.js b/data/web/js/site/admin.js index 1b500a18..21a513b1 100644 --- a/data/web/js/site/admin.js +++ b/data/web/js/site/admin.js @@ -5,6 +5,7 @@ jQuery(function($){ var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="}; function jq(myid) {return "#" + myid.replace( /(:|\.|\[|\]|,|=|@)/g, "\\$1" );} function escapeHtml(n){return String(n).replace(/[&<>"'`=\/]/g,function(n){return entityMap[n]})} + function validateRegex(e){var t=e.split("/"),n=e,r="";t.length>1&&(n=t[1],r=t[2]);try{return new RegExp(n,r),!0}catch(e){return!1}} function humanFileSize(i){if(Math.abs(i)<1024)return i+" B";var B=["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],e=-1;do{i/=1024,++e}while(Math.abs(i)>=1024&&e + Rspamd versucht die Maps umgehend aufzulösen. Bei Problemen sollte Rspamd manuell neugestartet werden.'; diff --git a/data/web/lang/lang.en.php b/data/web/lang/lang.en.php index f170ab1e..27c7408a 100644 --- a/data/web/lang/lang.en.php +++ b/data/web/lang/lang.en.php @@ -945,5 +945,6 @@ $lang['danger']['extra_acl_invalid_domain'] = 'External sender "%s" uses an inva $lang['admin']['rspamd_global_filters_agree'] = "I will be careful!"; $lang['admin']['rspamd_global_filters'] = 'Global filter maps'; $lang['admin']['rspamd_global_filters_info'] = 'Global filter maps contain different kind of global black and whitelists. Their names explain their purpose. All content must contain valid regular expression in the format of "/pattern/options" (e.g. /.+@domain\.tld/i).
- Although rudimentary checks are being executed on each line of regex, Rspamds functionality can be broken, if it fails to read the syntax correctly.'; + Although rudimentary checks are being executed on each line of regex, Rspamds functionality can be broken, if it fails to read the syntax correctly.
+ Rspamd will try to read the map content when changed. If you experience problems, restart Rspamd to enforce a map reload.';