As long as the stylesheet is used for their own account, and not for someone else, I would let them do it. However, since it can be used to capture someoneโs session (if they donโt log out), I need a user password to change the stylesheet. I would also force it to be stored locally.
Without a password, all the hijacker needs is:
#selector:before { content: expression(getCookie('phpsessid')); }
Obviously, if you don't have a function called getCookie, then they will need to do more work, but itโs still too easy for them to get cookie data. This is why password protection is required for a custom style sheet.
If you do not specify a field for each user and use the $_GET['css'] route, remember that it would be trivial to redirect the user from an external site (for example, MySpace) to your page using the route to a malicious CSS file to attack theft. If there is no authentication that protects the CSS file change, which should be password protected even when logging in, then your software is very, very vulnerable.
source share