Skip to content

Commit

Permalink
Merge pull request #42 from natron-io/qm
Browse files Browse the repository at this point in the history
validate tokenString
  • Loading branch information
janlauber authored Jan 27, 2022
2 parents 829a16d + 4af88d3 commit 7426a4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/authController.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ func CheckAuth(c *fiber.Ctx) []string {
bearerTokenSplit := strings.Split(bearerToken, " ")
tokenString = bearerTokenSplit[1]

if tokenString == "" {
// return unauthorized
return nil
}

} else {
if cookie == "" {
util.WarningLogger.Printf("IP %s is not authorized", c.IP())
Expand Down

0 comments on commit 7426a4a

Please sign in to comment.