mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 17:24:22 +00:00 
			
		
		
		
	typo fix
This commit is contained in:
		@@ -169,7 +169,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
 | 
			
		||||
	// For plain login, user must exist to reach this line.
 | 
			
		||||
	// Now verify password.
 | 
			
		||||
	if u.LoginType == PLAIN {
 | 
			
		||||
		if !u.ValidtePassword(passwd) {
 | 
			
		||||
		if !u.ValidatePassword(passwd) {
 | 
			
		||||
			return nil, ErrUserNotExist
 | 
			
		||||
		}
 | 
			
		||||
		return u, nil
 | 
			
		||||
 
 | 
			
		||||
@@ -146,7 +146,7 @@ func (u *User) EncodePasswd() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ValidtePassword checks if given password matches the one belongs to the user.
 | 
			
		||||
func (u *User) ValidtePassword(passwd string) bool {
 | 
			
		||||
func (u *User) ValidatePassword(passwd string) bool {
 | 
			
		||||
	newUser := &User{Passwd: passwd, Salt: u.Salt}
 | 
			
		||||
	newUser.EncodePasswd()
 | 
			
		||||
	return u.Passwd == newUser.Passwd
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user