Go-ethereum: Disallow PUT and DELETE on HTTP RPC

Created on 15 Nov 2017  路  2Comments  路  Source: ethereum/go-ethereum

Our HTTP RPC endpoint currently accepts requests on all request verbs (https://github.com/ethereum/go-ethereum/issues/15490#issuecomment-344618139). Perhaps we shouldn't do so blindly to avoid weird combinations that could potentially circumvent CORS? Would be nice to drop support for PUT and DELETE altogether, and think a bit about the others.

good first issue help wanted

All 2 comments

I can grab this.

What's the desired response and message for PUT and DELETE requests? 405 with any particular wording (if not we can probably just use Go's http.StatusText method for the error message)?

You can use "method not allowed". That's usually the style with Go's built in HTTP errors too, just a lowercase string of the error itself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aakilfernandes picture aakilfernandes  路  3Comments

362228416 picture 362228416  路  3Comments

tymat picture tymat  路  3Comments

wighawag picture wighawag  路  3Comments

carver picture carver  路  3Comments