mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 01:22:28 -05:00 
			
		
		
		
	don't initialize log entry until after cookie check
This commit is contained in:
		
					parent
					
						
							
								45aa5f5a26
							
						
					
				
			
			
				commit
				
					
						5377b22bff
					
				
			
		
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -132,10 +132,6 @@ func (m *nollamas) Serve(c *gin.Context) { | ||||||
| 		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()) |  | ||||||
| 	l = l.WithField("challenge", challenge) |  | ||||||
| 
 |  | ||||||
| 	// Check for a provided success token. | 	// Check for a provided success token. | ||||||
| 	cookie, _ := c.Cookie("gts-nollamas") | 	cookie, _ := c.Cookie("gts-nollamas") | ||||||
| 
 | 
 | ||||||
|  | @ -152,6 +148,10 @@ func (m *nollamas) Serve(c *gin.Context) { | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	// Prepare new log entry with challenge. | ||||||
|  | 	l := log.WithContext(c.Request.Context()) | ||||||
|  | 	l = l.WithField("challenge", challenge) | ||||||
|  | 
 | ||||||
| 	// Check query to see if an in-progress | 	// Check query to see if an in-progress | ||||||
| 	// challenge solution has been provided. | 	// challenge solution has been provided. | ||||||
| 	nonce, _ := c.GetQuery("nollamas_solution") | 	nonce, _ := c.GetQuery("nollamas_solution") | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue