Require api version header for sign out

This commit is contained in:
Terncode committed 2026-11-18 18:47:31 +01:00
1 parent 661dc4e654
commit c85359f4a3
1 file changed
+2 -2
+2 -2
View File
@@ -7,7 +7,7 @@ import { MINUTE } from '../../common/constants';
import { fromNow, hasFlag, includes, isError, uniqById } from '../../common/utils';
import { BannedMuted, Settings, ServerConfig, AccountFlags, ServerLiveSettings } from '../../common/adminInterfaces';
import { Account, IAccount, Origin, IOrigin } from '../db';
import { limit, auth as authRequest, wrap } from '../requestUtils';
import { limit, auth as authRequest, wrap, hash } from '../requestUtils';
import { CreateAccountOptions, findOrCreateAccount, SuspiciousCheckers, getAccountAlertMessage } from '../accountUtils';
import { createReporter, createFromRequest } from '../reporter';
import { logger, logServer, system } from '../logger';
@@ -292,7 +292,7 @@ export function authRoutes(
});
});
app.post('/sign-out', wrap(server, async req => {
app.post('/sign-out', hash, wrap(server, async req => {
kickCurrentUser(req);
await new Promise<void>(resolve => req.logout(error => {
if (error) {