Commit 9a6ed2c8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Return 404 errors for tokens in unknown groups.

parent 8ad6a7e2
......@@ -500,6 +500,12 @@ func tokensHandler(w http.ResponseWriter, r *http.Request, g, pth string) {
if !checkAdmin(w, r) {
return
}
// check that the group exists
_, err := group.GetDescription(g)
if err != nil {
httpError(w, err)
return
}
if pth == "/" {
if r.Method == "HEAD" || r.Method == "GET" {
tokens, etag, err := token.List(g)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment