Are Constants safe to use?

Also is it a good idea to filter $_SERVER variables before you use them? I've read they aren't safe.

😕

    Obviously if the user has enough time they could change their user agent to whatever they want including malicious code or whatever. So if you had a site displaying all the operating systems that had visited the page a user could change their user agent values to something like "<script language="Javascript">alert ("You are a looser...")</script>"

    I don't see how else these could be abused really.

    I wouldn't worry about it too much unless you are displaying the info for users to see.

      Write a Reply...