#1502 HTTP server does not use error code from util.error object as HTTP status code
Reporter
Jonas Schäfer
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Type-Defect
Priority-Medium
Milestone-0.12
Status-Fixed
Jonas Schäfer
on
What steps will reproduce the problem?
1. Submit a request with incorrect credentials
What is the expected output?
HTTP status 400 (as per https://www.oauth.com/oauth2-servers/access-tokens/access-token-response/ )
What do you see instead?
HTTP status 200 (with a mangled JSON, see #1501)
What version of the product are you using? On what operating system?
changeset: 3932:8b34222216f4
Zash
on
Thanks for the report. This seems to be a bug with the recently added util.error support in the HTTP server, not limited to the OAuth plugin. Investigating.
Changes
tags Status-Accepted
Zash
on
That was it. Fix incoming.
Changes
tags Status-Started Milestone-0.12
titlemod_http_oauth2 returns HTTP 200 for invalid_grant error HTTP server does not use error code from util.error object as HTTP status code
What steps will reproduce the problem? 1. Submit a request with incorrect credentials What is the expected output? HTTP status 400 (as per https://www.oauth.com/oauth2-servers/access-tokens/access-token-response/ ) What do you see instead? HTTP status 200 (with a mangled JSON, see #1501) What version of the product are you using? On what operating system? changeset: 3932:8b34222216f4
Thanks for the report. This seems to be a bug with the recently added util.error support in the HTTP server, not limited to the OAuth plugin. Investigating.
ChangesThat was it. Fix incoming.
Changesmod_http_oauth2 returns HTTP 200 for invalid_grant errorHTTP server does not use error code from util.error object as HTTP status codeFixed in https://hg.prosody.im/trunk/rev/977c9883f625
Changes