mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 03:52:24 -05:00 
			
		
		
		
	[bugfix] Change maximumPasswordLength to 72 bytes (#2012)
This commit is contained in:
		
					parent
					
						
							
								95e2024c2a
							
						
					
				
			
			
				commit
				
					
						d6fa74e5dc
					
				
			
		
					 2 changed files with 23 additions and 18 deletions
				
			
		|  | @ -45,7 +45,7 @@ func (suite *ValidationTestSuite) TestCheckPasswordStrength() { | |||
| 
 | ||||
| 	err = validate.NewPassword(empty) | ||||
| 	if suite.Error(err) { | ||||
| 		suite.Equal(errors.New("no password provided"), err) | ||||
| 		suite.Equal(errors.New("no password provided / provided password was 0 bytes"), err) | ||||
| 	} | ||||
| 
 | ||||
| 	err = validate.NewPassword(terriblePassword) | ||||
|  | @ -75,7 +75,7 @@ func (suite *ValidationTestSuite) TestCheckPasswordStrength() { | |||
| 
 | ||||
| 	err = validate.NewPassword(tooLong) | ||||
| 	if suite.Error(err) { | ||||
| 		suite.Equal(errors.New("password should be no more than 256 chars"), err) | ||||
| 		suite.Equal(errors.New("password should be no more than 72 bytes, provided password was 571 bytes"), err) | ||||
| 	} | ||||
| 
 | ||||
| 	err = validate.NewPassword(strongPassword) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue