Commit graph

109 commits

Author SHA1 Message Date
mark_story
c0d897b45c Merge branch '2.x' into 2.8 2016-02-06 20:55:08 -05:00
Mark Story
41a12e9aa2 Merge pull request #8067 from cakephp/issue-7906
Make the session cacheLimiter a configuration option.
2016-02-06 20:30:48 -05:00
mark_story
d9992bcaca Use safer methods to read session configuration.
Avoid potential undefined index warnings by using read() to safely fetch
data.

Refs #8101
2016-01-30 16:21:33 -05:00
Larry E. Masters
7c37cf5b5f Using _cookieName() instead session_name() 2016-01-19 16:29:56 -06:00
mark_story
57f620fc22 Make the session cacheLimiter a configuration option.
Instead of hardcoding to must-revalidate, developers can use a more
suitable option if they do not have to support IE8.

Refs #7096
2016-01-18 22:18:38 -05:00
Larry E. Masters
6ee621011b Using function_exists instead of using constant 2015-12-28 23:50:35 -05:00
Larry E. Masters
a1e140cbe0 Removing check for set key 2015-12-28 23:26:58 -05:00
Larry E. Masters
a02fb9e771 Fixing code sniffer errors 2015-12-28 18:40:14 -05:00
Larry E. Masters
a59ea13712 Fixes SessionComponentTest::testSessionValid. Refactored _hasSession and other erros on php 7
init would always set CakeSession::$_userAgent.
2015-12-28 17:26:35 -05:00
Larry E. Masters
33f2f46868 Refactoring and emoving one isset check 2015-12-28 11:52:19 -05:00
Larry E. Masters
5c3bc44ef5 Initial fixes for failing session tests 2015-12-28 11:41:23 -05:00
Larry E. Masters
577e1b089f Revert "Forcing bool return"
This reverts commit fac95baee7.
2015-12-14 19:31:08 -06:00
Larry E. Masters
464a266fc7 Revert "Using better way to check for active session"
This reverts commit 439a33c708.
2015-12-14 19:30:24 -06:00
Larry E. Masters
1a3598c3f4 Revert "session_status() not available until 5.4"
This reverts commit da9b6453ce.
2015-12-14 19:29:08 -06:00
Larry E. Masters
da9b6453ce session_status() not available until 5.4
Adding check for php version
2015-12-14 10:56:55 -06:00
Larry E. Masters
439a33c708 Using better way to check for active session 2015-12-14 10:42:46 -06:00
Larry E. Masters
fac95baee7 Forcing bool return 2015-12-13 20:05:54 -06:00
Marc Würth
e690662f0e Various improvments to the CakePH Plib files
Mostly CS, doc blocks and explicit returning nulls.
2015-09-25 17:11:20 +02:00
Mark Scherer
52e79987a2 Replacing self with static due to PHP5.3+. Following #7040. 2015-07-21 10:22:53 +02:00
mark_story
096a2ebb72 Merge branch '2.6' into 2.7
Conflicts:
	lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
	lib/Cake/VERSION.txt
2015-04-20 15:42:54 -04:00
mark_story
446dd408bb Renew the session even the session id is '0'.
This fixes AuthComponent not being able to log a user in when they
inadvertently change their session id to 0.

Refs #6053
2015-03-29 21:42:43 -04:00
Mark Scherer
611889235a Fix clear(). Add test cases. 2015-01-28 23:54:32 +01:00
mark_story
3078a1eb52 Merge branch 'master' into 2.7
Conflicts:
	lib/Cake/VERSION.txt
2015-01-16 22:22:26 -05:00
David Steinsland
687d0b44f5 Backport of https://github.com/cakephp/cakephp/issues/5667 2015-01-15 11:00:27 +01:00
euromark
394da88d23 Stay 100% BC for 2.7 2015-01-04 10:52:18 +01:00
euromark
39e0ce415d Backport of 3.0 Session API hardening and clear(). 2015-01-04 01:40:09 +01:00
mark_story
4cd2c8fdcb Merge branch 'master' into 2.7 2015-01-03 14:34:55 -05:00
euromark
5aff618109 Also autocreate session folder in debug mode 2014-12-27 20:34:47 +01:00
euromark
813925abee Backport Session consume() 2014-12-23 03:39:05 +01:00
ADmad
94e718372a Make CakeSession::read() return null for all failure cases. 2014-10-09 19:27:27 +05:30
ADmad
d60cd3ab2f Revert "Merge pull request #4405 from php-engineer/master-session-bugfix"
This reverts commit 5863adda42, reversing
changes made to 4c37cf6d4b.

There was no real issue. The lack of session cookie in CLI makes writing
tests a bit tricky which caused the confusion. Refs #4405, #4451.
2014-09-01 00:17:53 +05:30
Stefan Dickmann
66ccfaf5e2 session bugfix 2014-08-26 17:47:45 +02:00
euromark
864f5e06f6 Fix notice in CakeSession. 2014-08-04 13:32:20 +02:00
Ceeram
a266a9493d minor optimisation, refs comments on 81875cfeb1 2014-07-04 17:25:41 +02:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
ADmad
1d40f3e685 Fix API docblock CS errors. 2014-06-05 00:28:55 +05:30
mark_story
81875cfeb1 Optimize renew().
Don't call session_id() twice when we can use a local variable to store
the current session id.

Fixes #3531
2014-05-22 14:28:56 -04:00
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
mark_story
a5d50da040 Remove dead and unused code. 2014-02-11 16:38:24 -05:00
ADmad
4407cdb010 Avoid code duplication. 2014-01-22 11:36:45 +05:30
ADmad
84932fcc4a Don't start a session if it's known to be empty.
If an app only reads/checks the session there's no need to start a
session to know that the read/checked session value is empty.

Fixes #1981
2014-01-22 01:17:16 +05:30
José Lorenzo Rodríguez
6358741944 Merge pull request #2449 from cakephp/fix-session-cyclic-error
Fixed error in CakeSession that would call start() in an infinite loop
2013-12-09 02:18:21 -08:00
Jose Lorenzo Rodriguez
70d5c37834 Ensuring session is configured before trying to destory it 2013-12-08 13:44:16 +01:00
Jose Lorenzo Rodriguez
848a0ce217 Fiexed error in CakeSession that would call start() in an infinite loop
when the session is marked as invalid
2013-12-07 22:25:33 +01:00
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Bryan Crowe
bb65765d70 Updated additional references of Cake to CakePHP 2013-09-27 21:31:35 -04:00
mark_story
53d265cfba Merge branch 'master' into 2.4 2013-08-23 12:56:43 -04:00
mark_story
faa2cbd3c3 Remove session.auto_start configuration.
It now fails in PHP >= 5.5.2 . Also it never did anything in earlier
versions as the session would have already been started if auto_start
was true.

Fixes #4010
2013-08-21 13:18:44 -04:00
mark_story
0f2d59d987 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Network/CakeResponse.php
	lib/Cake/TestSuite/CakeTestCase.php
2013-08-18 23:10:08 -04:00
euromark
6cf147e8c8 unify null checks - avoid method call in favor of strict check 2013-08-16 20:12:49 +02:00