mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-15 20:49:53 +01:00
a
This commit is contained in:
4
ober.go
4
ober.go
@@ -186,13 +186,13 @@ func WatchPost(ctx *fasthttp.RequestCtx) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
username := fmt.Sprintf("%s", ctx.UserValue("user"))
|
username := fmt.Sprintf("%s", ctx.UserValue("user"))
|
||||||
if !authenticate(username, string(auth)) {
|
if !GheddoAuth(username, string(auth)) {
|
||||||
ctx.SetStatusCode(fasthttp.StatusUnauthorized)
|
ctx.SetStatusCode(fasthttp.StatusUnauthorized)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func authenticate(username, auth string) bool {
|
func GheddoAuth(username, auth string) bool {
|
||||||
user, err := ReadUser(username)
|
user, err := ReadUser(username)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user