mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-21 13:42:36 +08:00
c6e4bc53aa
* Implement pwn Signed-off-by: jolheiser <john.olheiser@gmail.com> * Update module Signed-off-by: jolheiser <john.olheiser@gmail.com> * Apply suggestions mrsdizzie Co-authored-by: mrsdizzie <info@mrsdizzie.com> * Add link to HIBP Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add more details to admin command Signed-off-by: jolheiser <john.olheiser@gmail.com> * Add context to pwn Signed-off-by: jolheiser <john.olheiser@gmail.com> * Consistency and making some noise ;) Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: mrsdizzie <info@mrsdizzie.com> Co-authored-by: zeripath <art27@cantab.net>
16 lines
360 B
Go
Vendored
16 lines
360 B
Go
Vendored
package pwn
|
|
|
|
// ErrEmptyPassword is an empty password error
|
|
type ErrEmptyPassword struct{}
|
|
|
|
// Error fulfills the error interface
|
|
func (e ErrEmptyPassword) Error() string {
|
|
return "password cannot be empty"
|
|
}
|
|
|
|
// IsErrEmptyPassword checks if an error is ErrEmptyPassword
|
|
func IsErrEmptyPassword(err error) bool {
|
|
_, ok := err.(ErrEmptyPassword)
|
|
return ok
|
|
}
|