[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:
tobi
2024-01-20 12:45:43 +01:00
committed by GitHub
parent 33dbd3ab7a
commit b2cacd6b01
3 changed files with 32 additions and 15 deletions

View File

@ -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()