properly reject unauthorized clients

This commit is contained in:
2025-01-18 12:28:03 +00:00
parent f835545283
commit 5a95fe8bef
+2 -2
View File
@@ -92,8 +92,8 @@ async function oauth2(request, env) {
const client_secret = await env[requestBody.get('client_id')] const client_secret = await env[requestBody.get('client_id')]
if (client_secret === null) { if (!client_secret) {
return newResponse(null, { status: 403 }) return newResponse(null, { status: 403,statusText:'unauthorized client' })
} }
requestBody.append('client_secret', client_secret) requestBody.append('client_secret', client_secret)