Skip to content

Commit

Permalink
limit number of '::' when parsing model name. It will prevent from in…
Browse files Browse the repository at this point in the history
…finity loop inside regex when parsing strings like 'ManageIQ::Providers::CloudManagermanaged-se'
  • Loading branch information
yrudman committed Oct 17, 2017
1 parent 450c384 commit b19567a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/miq_expression/tag.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class MiqExpression::Tag < MiqExpression::Target
REGEX = /
(?<model_name>([[:alnum:]]*(::)?)*)
(?<model_name>([[:alnum:]]*(::)?){4})
\.?(?<associations>([a-z_]+\.)*)
(?<namespace>\bmanaged|user_tag\b)
-(?<column>[a-z]+[_[:alnum:]]+)
Expand Down

0 comments on commit b19567a

Please sign in to comment.