mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 22:02:25 -05:00 
			
		
		
		
	used a repeated portion of their sucess token
This commit is contained in:
		
					parent
					
						
							
								7a6d8dfb14
							
						
					
				
			
			
				commit
				
					
						f9da51e6c5
					
				
			
		
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -122,12 +122,15 @@ func (m *nollamas) Serve(c *gin.Context) { | |||
| 	token := m.token(c, &hash) | ||||
| 
 | ||||
| 	// For unique challenge string just use a | ||||
| 	// portion of their unique 'success' token. | ||||
| 	// repeated portion of their 'success' token. | ||||
| 	// SHA256 is not yet cracked, this is not an | ||||
| 	// application of a hash requiring serious | ||||
| 	// cryptographic security and it rotates on | ||||
| 	// a TTL basis, so it should be fine. | ||||
| 	challenge := token[:len(token)/2] | ||||
| 	challenge := token[:len(token)/4] + | ||||
| 		token[:len(token)/4] + | ||||
| 		token[:len(token)/4] + | ||||
| 		token[:len(token)/4] | ||||
| 
 | ||||
| 	// Prepare new log entry with challenge. | ||||
| 	l := log.WithContext(c.Request.Context()) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue