Page MenuHomePhabricator

Status 405 Method Not Allowed on /oauth2/request/profile with OPTIONS
Closed, ResolvedPublic

Description

The endpoint for fetching the user profile returns a 405 Method Not Allowed when hit with OPTIONS.

Since OPTIONS is used for pre-flight verification for CORS, this makes the endpoint unreachable from the browser.

Event Timeline

I'm kicking this over to PET so we can review it for the correct routing. It's a bug in our OAuth implementation, so we could manage it either in Clinic Duty, Green Team, or Contractors Workboard. In any event, this is a real problem for the API Gateway.

I also wonder if there's a mechanism to handle OPTIONS requests automatically in our REST Router code. If not, maybe we should add it. If so, it'd be interesting to find out why it doesn't apply for this endpoint.

Change 621900 had a related patch set uploaded (by Daniel Kinzler; owner: Dbarratt):
[mediawiki/core@master] Handle CORS preflight request and prevent anon users from unsafe methods

https://gerrit.wikimedia.org/r/621900

Change 621900 merged by BPirkle:
[mediawiki/core@master] Handle CORS preflight request and prevent anon users from unsafe methods

https://gerrit.wikimedia.org/r/621900

Pppery subscribed.

Patch has been merged yesterday.

Three years later, assuming this is resolved.