RobertSpread / spreadcart

simple plugin to display a cart for the spreadshop everywhere on your domain
1 stars 1 forks source link

Proxy server needs to guard against injection attacks #8

Open jtlapp opened 8 years ago

jtlapp commented 8 years ago

The proxy server uses the raw parameters supplied by the client to construct an API request. I don't know what sorts of attacks may be possible, but it is always best to constrain client-provided parameters as much as possible before making use of them. For example, IDs should be validated to make sure they are strings of digits. It's also best to restrict string lengths.

jtlapp commented 8 years ago

Here's a description of the attacks it allows. Without guarding against injecting into HTTP requests, the server can be used as a launching pad for attacks elsewhere -- anywhere else.

https://www.owasp.org/index.php/HTTP_Response_Splitting

RobertSpread commented 8 years ago

Hi there,

Thank you for bringing this up. I am quite busy this weekend and will check this in detail on Monday! From the first glance you hae a very valid point here.

jtlapp commented 8 years ago

The node.js server in my nodejs-support pull request probably does sufficient guarding.