About security
Posted: Tue Oct 11, 2011 11:31 pm
Hi,
may I have a few specific questions about security?
Firstly I admit 'm not a security expert, just a mediocre web developer.
XSS
'm looking at templates and Template and Controller codes and it seems none of the output is escaped.
Database escaping escapes in the context of database, not HTML/CSS/JS...
May I ask how does OC prevents XSS? A solution could be to apply htmlspecialchars($value, ENT_QUOTES) to the ->data[] entries, in the rare cases we want to store html maybe whitelist tags using strip_tags...
Session fixation
Based on wikipedia add session_regenerate_id()?
CSRF
I see the CSRF is prevented in admin section by token, but what about customer? In case e.g. one of his favorites sites gets compromised with XSS that inserts a code that would try to buy something or change user data or anything... is there anything in place to prevent this? Not sure if we can use the token solution
The impact can of course most likely be solved by the admin of the e-shop, but it could still damage the shop's reputation
Thanks for responses
may I have a few specific questions about security?
Firstly I admit 'm not a security expert, just a mediocre web developer.
XSS
'm looking at templates and Template and Controller codes and it seems none of the output is escaped.
Database escaping escapes in the context of database, not HTML/CSS/JS...
May I ask how does OC prevents XSS? A solution could be to apply htmlspecialchars($value, ENT_QUOTES) to the ->data[] entries, in the rare cases we want to store html maybe whitelist tags using strip_tags...
Session fixation
Based on wikipedia add session_regenerate_id()?
CSRF
I see the CSRF is prevented in admin section by token, but what about customer? In case e.g. one of his favorites sites gets compromised with XSS that inserts a code that would try to buy something or change user data or anything... is there anything in place to prevent this? Not sure if we can use the token solution
The impact can of course most likely be solved by the admin of the e-shop, but it could still damage the shop's reputation
Thanks for responses