Please sign in to comment.
Replace cookie helper set_cookie() with an improved version
as a common function. Also deprecated CI_Input::set_cookie() which is now an alias for this new function. The new function will now replace cookies with the same name that were already set (either by set_cookie() or the native setcookie() and header() functions) in the PHP's headers queue. This fixes issue #1345 and supersedes PR #1780, which were aimed at fixing the Session library's behavior where it sent multiple cookies with the sess_cookie_name when the session cookie value had changed. It will now also always send the relatively new Max-Age cookie attribute (see http://tools.ietf.org/rfc/rfc6265.txt) and Expire will always be sent as a GMT timestamp, in an attempt to fix reported issues with Google Chrome (see issues #1726 and #1908). Cookies with the Secure attribute that are intended to only be send by the browser via encrypted connections will no longer be send if the website is not accessed via HTTPS. Also, the optional parameters' default values are changed to NULL instead of actually usable values, so that config_item() calls are only used if we're sure that the user/developer didn't set those intentionally. All usage of the native setcookie() function in CI has been replaces with set_cookie().
- Loading branch information...
Showing with 400 additions and 259 deletions.
- +177 −0 system/core/Common.php
- +4 −51 system/core/Input.php
- +1 −18 system/core/Security.php
- +0 −28 system/helpers/cookie_helper.php
- +4 −26 system/libraries/Session/drivers/Session_cookie.php
- +1 −1 system/libraries/Session/drivers/Session_native.php
- +7 −0 tests/codeigniter/core/Common_test.php
- +3 −18 tests/codeigniter/helpers/cookie_helper_test.php
- +51 −1 tests/codeigniter/libraries/Session_test.php
- +9 −0 tests/mocks/core/common.php
- +1 −21 tests/mocks/libraries/session.php
- +6 −1 user_guide_src/source/changelog.rst
- +87 −3 user_guide_src/source/general/common_functions.rst
- +46 −40 user_guide_src/source/installation/upgrade_300.rst
- +3 −51 user_guide_src/source/libraries/input.rst
Oops, something went wrong.