Re:Bypassing GitHub's OAuth Flow with a Head Request
by femto113 on Thursday November 07, 2019 @12:26PM
(#21475159)
In general I’d say testing the method in a controller is a smell,and in this particular case I’d suggest GET and POST should never have been handled by the same function. If GET did nothing but render the view sending a HEAD would be harmless.
[ Parent
| on HN ]
Re:Bypassing GitHub's OAuth Flow with a Head Request
by diminoten on Thursday November 07, 2019 @01:58PM
(#21476162)
Yeah the "if GET" code raised my eyebrows a bit, I know rails can handle separate GET and POST funcs.
Re:Bypassing GitHub's OAuth Flow with a Head Request
by icebraining on Thursday November 07, 2019 @04:06PM
(#21477248)
While you're not wrong, if I explicitly tell the framework to only accept GET and POST, I consider it a bug if any other method "gets through", particularly since the docs don't say that can happen.