#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
  1. 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

  2. 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
  3. Zash on

    That was it. Fix incoming.

    Changes
    • tags Status-Started Milestone-0.12
    • title mod_http_oauth2 returns HTTP 200 for invalid_grant error HTTP server does not use error code from util.error object as HTTP status code
    • owner Zash
  4. Zash on

    Fixed in https://hg.prosody.im/trunk/rev/977c9883f625

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.