looks like m[2] is always valid at this point, removing extra len() check

This commit is contained in:
jackspirou
2015-08-23 16:28:11 -05:00
parent cc984d394b
commit 8fd3f024a1

View File

@@ -22,7 +22,7 @@ func makeHandler(name string, fn func(http.ResponseWriter, *http.Request, string
}
// catch the special period cases that github does not allow for repos
if len(m) > 2 && (m[2] == "." || m[2] == "..") {
if m[2] == "." || m[2] == ".." {
http.NotFound(w, r)
return
}