enhance(backend): Implementation of HTTP header and body validation to fix SIF-2023-002 (#12334)

Using Buffer instead of string

Co-authored-by: perillamint <perillamint@silicon.moe>
This commit is contained in:
Jaehong Kang 2023-11-15 11:13:34 +09:00 committed by GitHub
parent aa6d0d4359
commit 04075ee0be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 5 deletions

View file

@ -88,9 +88,9 @@ export class ServerService implements OnApplicationShutdown {
}
// Register raw-body parser for ActivityPub HTTP signature validation.
fastify.register(fastifyRawBody, {
await fastify.register(fastifyRawBody, {
global: false,
encoding: 'utf-8',
encoding: null,
runFirst: true,
});