Admittedly this is an area where I wish we had gone against the grain back-in-the-day and used a templating "language", so that all output always went thru a parsing function. Then there'd be a definitive rule. As it is right now all our automated tests and security tests show all outputs as being properly sanitized. But sanitizing for security isn't the same as insulating users from entering bad html.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
ahahahaha, thank you for that bit of humor
Well, there is always 1.6...twig, twig, twig
Last edited by barco57; 15 May 2015 at 06:10 PM.
Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!
Last edited by lat9; 16 May 2015 at 03:19 PM. Reason: Correct misspelling
G'day,
It seems to me that Zen Cart expects us to enter HTML entities into all of the fields because Zen Cart typically does nothing to such fields on output. So if you enter L&M you get HTML validation errors. If you enter L&M you don't.
But doing this introduces a user interface problem. When the customer tries to search for L&M and it's been entered as L&M it won't be found.
So my thinking is that it would be better if we entered everything in the way a user would into search, i.e. L&M, but Zen Cart handles conversion of the appropriate characters to HTML entities on output, i.e. L&M.
Best regards, Lloyd Borrett.
Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42
G'day,
Of course you're correct lat9. If there is a defined standard then everyone knows what to do, and how output should be handled. Problem will be how to help users migrate their content to the standard.
Site search on large Zen Cart sites can already be very slow. (There's one I use regularly where a search typically takes more than a minute.) So I wouldn't want search to handle it both ways if it will slow the search even more.
In my old ZC 1.3.6 installation, if you entered HTML entities, once saved they were there. But if you edited the field, they were lost. Zen Cart would display & not & when retrieving the field, and it stored & when the field was saved. This was extremely frustrating and meant that there was no point in trying to put in HTML entities. We were forced to put up with HTML validation issues, which is not a good look, and causes flow on issues.
My vote would be for the 'standard' to be raw HTML. Then Zen Cart needs to convert all output to HTML entities. But maybe I'm not fully understanding other impacts of doing it this way.
Best regards, Lloyd Borrett.
Zen Cart 1.5.5e, PHP 5.3.29 MySQL 5.5.42