Skip to content

Commit

Permalink
Updated to stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
ronmarasigan committed Sep 6, 2022
1 parent 2a71f89 commit fa0f5be
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 34 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
2 changes: 1 addition & 1 deletion app/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
| LavaLust Version
| -------------------------------------------------------------------
*/
$config['VERSION'] = '3.0.3';
$config['VERSION'] = '3.1.0';

/*
| -------------------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
LavaLust Version 3.1.0 (Please update to this version)

# Changelog

1. Fixed known bugs.
2. Fixed bugs of some kernel classes, libraries and helpers.

LavaLust Version 3.0.1 and higher

# Changelog

1. Requires to use PHP version >= 7.4

LavaLust Version 3

# Changelog
Expand Down
15 changes: 15 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "ronmarasigan/lavalust",
"description": "LavaLust Framework",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "ronmarasigan",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.4"
}
}
Binary file added favicon.ico
Binary file not shown.
10 changes: 2 additions & 8 deletions scheme/kernel/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,7 @@ public function csrf_set_cookie()
{
$expiration = time() + $this->_csrf_expire;

//check for PHP Version later than 7.3.0
if (PHP_VERSION_ID < 70300)
{
setcookie(
$this->_csrf_cookie_name, $this->_csrf_hash, $expiration, config_item('cookie_path'), config_item('cookie_domain'), config_item('cookie_secure'), config_item('cookie_httponly'));
} else {
setcookie($this->_csrf_cookie_name,
setcookie($this->_csrf_cookie_name,
$this->_csrf_hash,
array('samesite' => 'Strict',
'secure' => FALSE,
Expand All @@ -193,7 +187,7 @@ public function csrf_set_cookie()
'domain' => config_item('cookie_domain'),
'httponly' => config_item('cookie_httponly'))
);
}
return $this;
}

Expand Down
36 changes: 11 additions & 25 deletions scheme/libraries/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,17 @@ public function __construct()
//Check for expiration time
$expiration = empty($this->config['cookie_expiration']) ? 0 : time() + $this->config['cookie_expiration'];

//check for PHP Version later than 7.3.0
if (PHP_VERSION_ID < 70300)
{
setcookie(
$this->config['cookie_name'],
$this->session_id(),
$expiration,
$this->config['cookie_path'],
$this->config['cookie_domain'],
$this->config['cookie_secure'],
TRUE
);
} else {
setcookie(
$this->config['cookie_name'],
$this->session_id(),
array('samesite' => $this->config['cookie_samesite'],
'secure' => $this->config['cookie_secure'],
'expires' => $expiration,
'path' => $this->config['cookie_path'],
'domain' => $this->config['cookie_domain'],
'httponly' => $this->config['cookie_httponly'],
)
);
}
setcookie(
$this->config['cookie_name'],
$this->session_id(),
array('samesite' => $this->config['cookie_samesite'],
'secure' => $this->config['cookie_secure'],
'expires' => $expiration,
'path' => $this->config['cookie_path'],
'domain' => $this->config['cookie_domain'],
'httponly' => $this->config['cookie_httponly'],
)
);
}

$this->_lava_init_vars();
Expand Down

0 comments on commit fa0f5be

Please sign in to comment.