e11c40ee by astaxie

fix #244

1 parent 5d55ca19
...@@ -26,8 +26,10 @@ func (mr *FilterRouter) ValidRouter(router string) bool { ...@@ -26,8 +26,10 @@ func (mr *FilterRouter) ValidRouter(router string) bool {
26 return true 26 return true
27 } 27 }
28 matches := mr.regex.FindStringSubmatch(router) 28 matches := mr.regex.FindStringSubmatch(router)
29 if len(matches[0]) == len(router) { 29 if len(matches) > 0 {
30 return true 30 if len(matches[0]) == len(router) {
31 return true
32 }
31 } 33 }
32 } 34 }
33 return false 35 return false
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!