Oh yeah
This commit is contained in:
parent
c2e19cc6da
commit
47ce432681
2
api.go
2
api.go
@ -29,7 +29,7 @@ func (a AuthMiddleware) Serve(ctx *iris.Context) {
|
|||||||
au, err := DB.GetByUsername(username)
|
au, err := DB.GetByUsername(username)
|
||||||
if err == nil && CorrectPassword(password, au.Password) {
|
if err == nil && CorrectPassword(password, au.Password) {
|
||||||
// Password ok
|
// Password ok
|
||||||
if err := ctx.ReadJSON(&postData); err != nil {
|
if err := ctx.ReadJSON(&postData); err == nil {
|
||||||
// Check that the subdomain belongs to the user
|
// Check that the subdomain belongs to the user
|
||||||
if au.Subdomain == postData.Subdomain {
|
if au.Subdomain == postData.Subdomain {
|
||||||
log.Debugf("Accepted authentication from [%s]", usernameStr)
|
log.Debugf("Accepted authentication from [%s]", usernameStr)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user