Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Jan 31, 2024
1 parent 345e68f commit 219e921
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/middleware/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ func CheckAllPerm(c echo.Context, ppaths ...string) (err error) {

func Auth(c echo.Context) error {
user := c.Form(`user`)
if !com.IsUsername(user) {
return c.NewError(code.UserNotFound, `用户名无效`).SetZone(`user`)
}
pass := c.Form(`pass`)
var err error
pass, err = backend.DecryptPassword(c, pass)
Expand Down

0 comments on commit 219e921

Please # to comment.