diff options
author | 2024-01-20 12:45:43 +0100 | |
---|---|---|
committer | 2024-01-20 12:45:43 +0100 | |
commit | b2cacd6b0188f983d1b99f968dfa465a98c9f925 (patch) | |
tree | b8d18486b100e627721010c03355751e123e9d2e /internal/processing/account/alias_test.go | |
parent | [bugfix] Ensure domain block side effects skipped if allow in place (blocklis... (diff) | |
download | gotosocial-b2cacd6b0188f983d1b99f968dfa465a98c9f925.tar.xz |
[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
Diffstat (limited to 'internal/processing/account/alias_test.go')
-rw-r--r-- | internal/processing/account/alias_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/processing/account/alias_test.go b/internal/processing/account/alias_test.go index 9be5721aa..80fdb81c1 100644 --- a/internal/processing/account/alias_test.go +++ b/internal/processing/account/alias_test.go @@ -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() |