mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 05:52:25 -05:00 
			
		
		
		
	[bugfix] Prevent URL + URI for same account being used as alias target (#2545)
* [bugfix] Ensure URL and URI for same account can't both be provided as alias * test whoopsie from previous PR
This commit is contained in:
		
					parent
					
						
							
								33dbd3ab7a
							
						
					
				
			
			
				commit
				
					
						b2cacd6b01
					
				
			
		
					 3 changed files with 32 additions and 15 deletions
				
			
		|  | @ -132,6 +132,17 @@ func (suite *AliasTestSuite) TestAliasAccount() { | |||
| 				"http://localhost:8080/users/admin", | ||||
| 			}, | ||||
| 		}, | ||||
| 		// Alias zork to turtle using both URI and URL | ||||
| 		// for turtle. Only URI should end up being used. | ||||
| 		{ | ||||
| 			newAliases: []string{ | ||||
| 				"http://localhost:8080/users/1happyturtle", | ||||
| 				"http://localhost:8080/@1happyturtle", | ||||
| 			}, | ||||
| 			expectedAliases: []string{ | ||||
| 				"http://localhost:8080/users/1happyturtle", | ||||
| 			}, | ||||
| 		}, | ||||
| 	} { | ||||
| 		var ( | ||||
| 			ctx      = context.Background() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue