nokia / restful

A powerful RESTful framework for Go.
BSD 3-Clause "New" or "Revised" License
17 stars 13 forks source link

SSRF/CSRF #54

Open Som-Som-CC opened 11 months ago

Som-Som-CC commented 11 months ago

Client function CheckRedirect is used to protect against some forms of Server-side request forgery (SSRF) / Cross-site request forgery (CSRF) attacks. It would be, however, more convenient to have some prepared functions. Such as

Note that redirect is just one way of performing SSRF attack. The original address, e.g. received in form of a callback address, can be maliciously constructed, too. That is not covered by this change request.

Refs:

Som-Som-CC commented 7 months ago

Even if redirection is allowed client's HTTPS() settings must be applied. As it is implemented in Do(), that must work automatically.