From 413381e7c9f297f94dff156adc4db00ba6ba2c9b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 8 Jan 2022 01:32:39 +0200 Subject: [ci skip] Fix CI_Session_driver_interface for PHP 5 (ref #6078) --- system/libraries/Session/OldSessionWrapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Session/OldSessionWrapper.php b/system/libraries/Session/OldSessionWrapper.php index 5934b5218..a8bc1d0c0 100644 --- a/system/libraries/Session/OldSessionWrapper.php +++ b/system/libraries/Session/OldSessionWrapper.php @@ -49,7 +49,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_SessionWrapper implements SessionHandlerInterface { - protected CI_Session_driver_interface $driver; + protected $driver; public function __construct(CI_Session_driver_interface $driver) { -- cgit v1.2.3-24-g4f1b From 52d04d27b6e172093d7d9f70c6e77846b6742742 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 8 Jan 2022 16:57:19 +0200 Subject: [ci skip] Actually use the Session wrapper (ref #6078) --- system/libraries/Session/Session.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'system') diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 87113e2b5..9d4561616 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -107,17 +107,17 @@ class CI_Session { $wrapper = new CI_SessionWrapper($class); if (is_php('5.4')) { - session_set_save_handler($class, TRUE); + session_set_save_handler($wrapper, TRUE); } else { session_set_save_handler( - array($class, 'open'), - array($class, 'close'), - array($class, 'read'), - array($class, 'write'), - array($class, 'destroy'), - array($class, 'gc') + array($wrapper, 'open'), + array($wrapper, 'close'), + array($wrapper, 'read'), + array($wrapper, 'write'), + array($wrapper, 'destroy'), + array($wrapper, 'gc') ); register_shutdown_function('session_write_close'); -- cgit v1.2.3-24-g4f1b From 2d4ddf57cc64f37a76e53403bc1442a54cc01897 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 8 Jan 2022 17:02:48 +0200 Subject: [ci skip] Attempt to hack SameSite into session_set_cookie_params() pre-PHP7.3 --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 9d4561616..8d3ba2857 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -336,7 +336,7 @@ class CI_Session { { session_set_cookie_params( $params['cookie_lifetime'], - $params['cookie_path'], + $params['cookie_path'].'; SameSite='.$params['cookie_samesite'], $params['cookie_domain'], $params['cookie_secure'], TRUE // HttpOnly; Yes, this is intentional and not configurable for security reasons -- cgit v1.2.3-24-g4f1b From d678dbb1937a4a3a44d335118149e53f6aacaacf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 8 Jan 2022 22:43:04 +0200 Subject: [ci skip] Merge pull request #5729 from emrulmax2/patch-1 NOT BETWEEN syntax error DB where() issue solved --- system/database/DB_driver.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system') diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 6e1d8d11e..fd7cd5543 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -1576,6 +1576,7 @@ abstract class CI_DB_driver { '\s+EXISTS\s*\(.*\)', // EXISTS(sql) '\s+NOT EXISTS\s*\(.*\)', // NOT EXISTS(sql) '\s+BETWEEN\s+', // BETWEEN value AND value + '\s+NOT BETWEEN\s+', // NOT BETWEEN value AND value '\s+IN\s*\(.*\)', // IN(list) '\s+NOT IN\s*\(.*\)', // NOT IN (list) '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] -- cgit v1.2.3-24-g4f1b From 6a7254ca653b08e2b73ffd58b18c2bf70b8bd35e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 15 Jan 2022 15:09:45 +0200 Subject: [ci skip] Fix a coding typo from 1a2651040ef701e750b1c13cd69cc70814b079d0 --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 8d3ba2857..68dc0ab63 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -182,7 +182,7 @@ class CI_Session { if ( ! $this->_config['cookie_secure'] && $this->_config['cookie_samesite'] === 'None') { - log_message('error', 'Session:', $this->_config['cookie_name'].' cookie sent with SameSite=None, but without Secure attribute.'); + log_message('error', "Session: '".$this->_config['cookie_name']."' cookie sent with SameSite=None, but without Secure attribute.'"); } } -- cgit v1.2.3-24-g4f1b