diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/activitypub/actor.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/reverse-proxy.ts | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index 14dd1b9b9..f802658cf 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts | |||
@@ -177,7 +177,7 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo | |||
177 | 177 | ||
178 | if (actor.Avatar) { | 178 | if (actor.Avatar) { |
179 | // Don't update the avatar if the filename did not change | 179 | // Don't update the avatar if the filename did not change |
180 | if (actor.Avatar.filename === info.name) return actor | 180 | if (actor.Avatar.fileUrl === info.fileUrl) return actor |
181 | 181 | ||
182 | try { | 182 | try { |
183 | await actor.Avatar.destroy({ transaction: t }) | 183 | await actor.Avatar.destroy({ transaction: t }) |
diff --git a/server/tests/api/server/reverse-proxy.ts b/server/tests/api/server/reverse-proxy.ts index 39b9fecc0..b6b33a884 100644 --- a/server/tests/api/server/reverse-proxy.ts +++ b/server/tests/api/server/reverse-proxy.ts | |||
@@ -103,8 +103,12 @@ describe('Test application behind a reverse proxy', function () { | |||
103 | }) | 103 | }) |
104 | 104 | ||
105 | it('Should rate limit signup', async function () { | 105 | it('Should rate limit signup', async function () { |
106 | for (let i = 0; i < 3; i++) { | 106 | for (let i = 0; i < 10; i++) { |
107 | await registerUser(server.url, 'test' + i, 'password') | 107 | try { |
108 | await registerUser(server.url, 'test' + i, 'password') | ||
109 | } catch { | ||
110 | // empty | ||
111 | } | ||
108 | } | 112 | } |
109 | 113 | ||
110 | await registerUser(server.url, 'test42', 'password', 429) | 114 | await registerUser(server.url, 'test42', 'password', 429) |