Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heads up: Stricter validation coming soon on the add/update org membership API endpoint #22

Closed
kytrinyx opened this issue Sep 4, 2018 · 2 comments

Comments

@kytrinyx
Copy link

kytrinyx commented Sep 4, 2018

Hi 馃憢 ,

I an engineer on the API team at GitHub. A colleague and I are currently going through GitHub's REST API, tightening up validations.

We noticed that a fair number of requests from this library to the Add or update organization membership endpoint that are passing a Content-Length key as part of the payload. Content-Length is an accepted header, but is not a valid value for the payload to this endpoint.

Currently the backend code is ignoring unknown parameters, but we're shortly going to change the validation to return a 422 Unprocessable Entity if an undocumented parameter is passed.

We're expecting to make this change in about a week, and wanted to give you a heads up so you're not caught by surprise.

@milo
Copy link
Owner

milo commented Sep 5, 2018

Hi Katrina. Many thanks for notifying me!

This library is only wrapper above PHP HTTP clients (strem or cURL) and it does not build payload itself. It only gets array/object payload given by user and encodes it into JSON. So, sending Content-Length in JSON paylod is probably bug in some 3rd party library.

I walked through all dependents (and its dependents) on Packagist but I did't find any repository matching Content-Length keyword.

Surprise is probably waiting for someone else :o)

@kytrinyx
Copy link
Author

kytrinyx commented Sep 5, 2018

Got it! Thanks for taking a look.

@kytrinyx kytrinyx closed this as completed Sep 5, 2018
Repository owner deleted a comment Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants