Improve algorithm of setting and storing locale setting
Bug fix

Properly check file handler before making use of it in common.php
Restrict opening of files outside the Mibew installation
Fix multiple potential filepath manipulation vulnerabilities
Set PHPSESSID cookie as HTTP-only
Set PHPSESSID cookie as secure if HTTPS is used
Fix bug with userid type in sql requests
Switch to a more reliable function for generation of userid
Switch to a more secure method for generation of the token for request for a password restore
Switch to a more secure method for generation of the CSRF token
Fix regular expressions for integer IDs
Switch to a more secure method for generation of the thread token