You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
validatesself.slug_column,:format=>{:with=>/^[a-z0-9-]+$/,:message=>"contains invalid characters. Only downcase letters, numbers, and '-' are allowed."}
I stumbled upon this issue while using the Annotate gem, which generates the following warning while attempting to annotate models using slugs:
Unable to annotate app/models/sample_model.rb: The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option?
The text was updated successfully, but these errors were encountered:
slug/lib/slug/slug.rb
Line 31 in 9dd2441
Per Rails regex security guidelines,
\A
and\z
should be used instead of^
and$
.I stumbled upon this issue while using the Annotate gem, which generates the following warning while attempting to annotate models using slugs:
Unable to annotate app/models/sample_model.rb: The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option?
The text was updated successfully, but these errors were encountered: