From 6c8d554fd50278abe4a1c8ad50b811728d5f2a49 Mon Sep 17 00:00:00 2001 From: notzippy Date: Fri, 14 Jul 2017 11:21:00 -0700 Subject: [PATCH] Prevent partial matches on controllers Module was allowing for partial matches on controllers, this fixes it closes #1200 --- module.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module.go b/module.go index 3cb433117..9be24dbe4 100644 --- a/module.go +++ b/module.go @@ -44,7 +44,7 @@ func (m *Module) ControllerByName(name, action string) (ctype *ControllerType) { comparision = m.Namespace() + name } for _, c := range m.ControllerTypeList { - if strings.Index(c.Name(), comparision) > -1 { + if c.Name() == comparision { ctype = c break }