mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 13:35:42 +09:00
fix: remove Flutter captcha bypass (#1234)
This commit is contained in:
1 parent
a61134d2c3
commit
d5cc48a92d
2 files changed
+2
-9
No files matched your search
@@ -11,7 +11,6 @@ import type {InstanceCaptchaEffectiveConfig, InstanceCaptchaProvider} from '../i
|
||||
import type {User} from '../models/User';
|
||||
import {accountPolicyContactHasCapability} from '../risk/AccountPolicyService';
|
||||
import type {HonoEnv} from '../types/HonoEnv';
|
||||
import {isFluxerFlutterClient} from '../utils/UserAgentUtils';
|
||||
|
||||
function resolveProviderSecret(
|
||||
config: InstanceCaptchaEffectiveConfig,
|
||||
@@ -88,9 +87,3 @@ export const CaptchaMiddleware = createMiddleware<HonoEnv>(async (ctx, next) =>
|
||||
await verifyCaptchaToken(ctx);
|
||||
await next();
|
||||
});
|
||||
export const CaptchaMiddlewareSkipFlutter = createMiddleware<HonoEnv>(async (ctx, next) => {
|
||||
if (!isFluxerFlutterClient(ctx.req.raw)) {
|
||||
await verifyCaptchaToken(ctx);
|
||||
}
|
||||
await next();
|
||||
});
|
||||
Reference in new issue
Block a user