Security policy: reject magic_quotes configuration if enabled. Cleanup QueryString.php of magic quotes.

Signed-off-by: Norv <a.w.norv@gmail.com>
Move utility functions _recursive() to Util class. They aren't currently used, but potentially useful...

Signed-off-by: Norv <a.w.norv@gmail.com>
htmlspecialchars() directly the quotes in HTTP_USER_AGENT, it shouldn't pose problems

Signed-off-by: Norv <a.w.norv@gmail.com>
Use Util::htmlspecialchars() in QueryString.php functions. This removes $smcFunc entirely from QueryString.php..

Signed-off-by: Norv <a.w.norv@gmail.com>
Refactor $smcFunc['db_unescape_string'] -> $db->unescape_string() and remove it from $smcFunc.

Signed-off-by: Norv <a.w.norv@gmail.com>
Move cleanRequest() up in the execution chain. (before loading the db)

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove a custom $_SERVER['is_cli'] var

Signed-off-by: Norv <a.w.norv@gmail.com>
Add Request class, for the request and its environment. It holds currently client/ban ips and user agent, will hold http scheme.
cleanRequest() uses it.

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove $_SERVER['BAN_CHECK_IP'] -> ban_ip() method of Request

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove the last trace of $_SERVER['BAN_CHECK_IP'] which was for compatibility

Signed-off-by: Norv <a.w.norv@gmail.com>
Add parseRequest(), the method is part of request cleaning and makes sure board, topic, and other necessary vars are ready to use.

Signed-off-by: Norv <a.w.norv@gmail.com>
Add server_software() to Request, to query for the webserver.

Signed-off-by: Norv <a.w.norv@gmail.com>
Refactor $_SERVER['HTTP_USER_AGENT'] to user_agent().

Signed-off-by: Norv <a.w.norv@gmail.com>
Add scheme, https or http

Signed-off-by: Norv <a.w.norv@gmail.com>