1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-25 01:55:57 +01:00

Check for empty path in api.

This commit is contained in:
Juliusz Chroboczek 2024-05-01 22:20:02 +02:00
parent e8ea707904
commit fe15057252

View file

@ -234,6 +234,10 @@ func apiGroupHandler(w http.ResponseWriter, r *http.Request, pth string) {
} }
func usersHandler(w http.ResponseWriter, r *http.Request, g, pth string) { func usersHandler(w http.ResponseWriter, r *http.Request, g, pth string) {
if pth == "" {
http.NotFound(w, r)
return
}
if pth == "/" { if pth == "/" {
if !checkAdmin(w, r) { if !checkAdmin(w, r) {
return return