properly reject unauthorized clients
This commit is contained in:
+2
-2
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user