From 5a95fe8bef3166d98732c27a18157f53a0e68d2c Mon Sep 17 00:00:00 2001 From: sugoidogo Date: Sat, 18 Jan 2025 12:28:03 +0000 Subject: [PATCH] properly reject unauthorized clients --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index b06449b..0971d36 100644 --- a/src/index.js +++ b/src/index.js @@ -92,8 +92,8 @@ async function oauth2(request, env) { const client_secret = await env[requestBody.get('client_id')] - if (client_secret === null) { - return newResponse(null, { status: 403 }) + if (!client_secret) { + return newResponse(null, { status: 403,statusText:'unauthorized client' }) } requestBody.append('client_secret', client_secret)