mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02: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:
@ -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()
|
||||
|
Reference in New Issue
Block a user