mirror of
https://github.com/ultrasn0w/huso.git
synced 2026-10-26 18:04:17 +01:00
a
This commit is contained in:
1 parent
19f860f418
commit
7307b3c808
1 file changed
+2
-2
@@ -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