mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 13:30:29 +03:00
Make session cookie more secure
This commit is contained in:
parent
13729dac93
commit
003ba6f46b
@ -15,11 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Prevent Mibew from access to files outside the installation
|
||||
@ini_set('open_basedir', dirname(__FILE__) . '/../');
|
||||
@ini_set('session.cookie_httponly', TRUE);
|
||||
if (is_secure_request()) {
|
||||
@ini_set('session.cookie_secure', TRUE);
|
||||
}
|
||||
|
||||
require_once(dirname(__FILE__) . '/converter.php');
|
||||
require_once(dirname(__FILE__) . '/config.php');
|
||||
@ -37,6 +34,14 @@ $home_locale = locale_pattern_check($home_locale) && locale_exists($home_locale)
|
||||
$version = '1.6.5';
|
||||
$jsver = "165";
|
||||
|
||||
// Make session cookie more secure
|
||||
@ini_set('session.cookie_httponly', TRUE);
|
||||
if (is_secure_request()) {
|
||||
@ini_set('session.cookie_secure', TRUE);
|
||||
}
|
||||
@ini_set('session.cookie_path', "$webimroot/");
|
||||
@ini_set('session.name', 'MibewSessionID');
|
||||
|
||||
session_start();
|
||||
|
||||
function myiconv($in_enc, $out_enc, $string)
|
||||
@ -843,7 +848,7 @@ function sanitize_reg_escape($string)
|
||||
|
||||
function safe_htmlspecialchars($string)
|
||||
{
|
||||
return htmlspecialchars($string, ENT_QUOTES);
|
||||
return htmlspecialchars($string, ENT_QUOTES);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user