Skip to content

Commit 433f529

Browse files
author
root
committed
Fix regex security warning
1 parent 0952354 commit 433f529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: app/forms/plugin_settings_form.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class PluginSettingsForm
22
unloadable
33

4-
DOMAIN_REGEX = /^[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*(:\d+)?$/i
4+
DOMAIN_REGEX = /\A[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*(:\d+)?\z/i
55
EMAIL_REGEX = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
66
BOOLEAN_FIELDS = ['true', 'false']
77
CACHE_ADAPTERS = ['database', 'memcached', 'redis']

0 commit comments

Comments
 (0)