Skip to content

Commit 6c8d554

Browse files
authored
Prevent partial matches on controllers
Module was allowing for partial matches on controllers, this fixes it closes revel#1200
1 parent 1ebb4a5 commit 6c8d554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (m *Module) ControllerByName(name, action string) (ctype *ControllerType) {
4444
comparision = m.Namespace() + name
4545
}
4646
for _, c := range m.ControllerTypeList {
47-
if strings.Index(c.Name(), comparision) > -1 {
47+
if c.Name() == comparision {
4848
ctype = c
4949
break
5050
}

0 commit comments

Comments
 (0)