summaryrefslogtreecommitdiff
path: root/ext/session
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Christoph M. Becker2021-03-231-1/+2
|\ | | | | | | | | * PHP-8.0: Properly initialize PS(mod) on RINIT
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-231-1/+2
| |\ | | | | | | | | | | | | * PHP-7.4: Properly initialize PS(mod) on RINIT
| | * Properly initialize PS(mod) on RINITChristoph M. Becker2021-03-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need to do that in case a user handler has been set. However, we can't do that in `php_rinit_session_globals()` since that function is called by PHP function `session_destroy()` too, but in that case we don't want to reset PS(mod). Closes GH-6795.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-03-222-16/+50
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #80889: amendment
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-222-16/+50
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #80889: amendment
| | * Fix #80889: amendmentChristoph M. Becker2021-03-222-16/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `session_set_save_handler()` may be called with callables instead of an object; we need to cater to that as well. We also extract a set_user_save_handler_ini() function to avoid code duplication. Closes GH-6796.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-03-192-1/+38
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #80889: Cannot set save handler when save_handler is invalid
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-192-1/+38
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #80889: Cannot set save handler when save_handler is invalid
| | * Fix #80889: Cannot set save handler when save_handler is invalidChristoph M. Becker2021-03-192-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | There is no need to require a (valid) save_handler to be set, when a user handler is supposed to be set. We just have to make sure, that no user handler is already set in this case. Closes GH-6788.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-223-9/+30
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #80774: session_name() problem with backslash
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-223-9/+30
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #80774: session_name() problem with backslash
| | * Fix #80774: session_name() problem with backslashChristoph M. Becker2021-02-223-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we do no longer URL decode cookie names[1], we must not URL encode the session name. We need to prevent broken Set-Cookie headers, by rejecting names which contain invalid characters. [1] <http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0> Closes GH-6711.
* | | Improve class entry generationMáté Kocsis2021-02-161-5/+4
| | | | | | | | | | | | Related to GH-6701
* | | Generate class entries from stubs for phar, posix, pspell, readline, ↵Máté Kocsis2021-02-154-21/+48
| | | | | | | | | | | | | | | | | | reflection, session, shmop Closes GH-6692
* | | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* | | Replace zend_bool uses with boolNikita Popov2021-01-153-27/+27
| | | | | | | | | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | | Restrict allowed usages of $GLOBALSNikita Popov2021-01-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This restricts allowed usage of $GLOBALS, with the effect that plain PHP arrays can no longer contain INDIRECT elements. RFC: https://wiki.php.net/rfc/restrict_globals_usage Closes GH-6487.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-11-251-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80377
| * | Fixed bug #80377Nikita Popov2020-11-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure the $PHP_THREAD_SAFETY variable is always available when configuring extensions. It was previously available for phpized extensions, but for in-tree builds it was being set too late. Then, use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS in bundled extensions, which makes sure these checks also work for phpize builds.
* | | Merge branch 'PHP-8.0'Dmitry Stogov2020-11-251-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Revert "Fixed bug #80377"
| * | Revert "Fixed bug #80377"Dmitry Stogov2020-11-251-1/+1
| | | | | | | | | | | | This reverts commit fc26ad9b1220fdfd7db15ecaff5e7c38283c55b6.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-11-241-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fixed bug #80377
| * | Fixed bug #80377Nikita Popov2020-11-241-1/+1
| | | | | | | | | | | | | | | | | | Use $PHP_THREAD_SAFETY instead of $enable_zts to check for ZTS. This variable is also available for phpize builds, while enable_zts is only present for in-tree builds.
* | | Allow running session tests in parallelNikita Popov2020-10-2347-252/+266
|/ / | | | | | | | | Use unique session IDs and/or save paths. Also removes the annoying order-dependence of session tests.
* | Review parameter names in ext/sessionMáté Kocsis2020-09-302-25/+35
| | | | | | | | Closes GH-6239
* | Use callable type in register_shutdown_function()Nikita Popov2020-09-251-13/+9
| | | | | | | | | | | | To make things a bit less weird, split off the function name into a zval stored separately from the arguments. This allows us to use normal zpp and get standard behavior.
* | Drop usage of E_RECOVERABLE_ERROR in Session extensionGeorge Peter Banyard2020-09-225-14/+31
| |
* | Run tidyNikita Popov2020-09-182-3/+3
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | Declare array|int and object-of-class|int types in stubsMáté Kocsis2020-09-144-25/+40
| | | | | | | | | | | | Closes GH-6081 Co-Authored-By: Nikita Popov <nikic@php.net>
* | Unmark tests as XFAIL on WindowsChristoph M. Becker2020-09-142-10/+0
| | | | | | | | | | | | | | This issue has been resolved[1], so the tests are expected to pass on Windows again. [1] <https://github.com/php/php-src/commit/0a03291b51e7cf199c06ba4ae914277ce0ac4202>
* | Mark tests as XFAIL on WindowsChristoph M. Becker2020-09-132-0/+10
| | | | | | | | | | | | | | | | | | These tests segfault with tracing JIT on Windows as of a recent commit[1]. A link to a backtrace is available in a comment[2]. For now, we mark these tests as XFAIL, to keep AppVeyor CI helpful. [1] <https://github.com/php/php-src/commit/817ae414962480d133ed76618b88b3e7ba482718> [2] <https://github.com/php/php-src/commit/817ae414962480d133ed76618b88b3e7ba482718#commitcomment-42227420>
* | Clean up ext/session errorsMáté Kocsis2020-09-1156-309/+395
| | | | | | | | Closes GH-6111
* | Improve error messages mentioning parameters instead of argumentsMáté Kocsis2020-09-092-2/+2
| | | | | | | | Closes GH-5999
* | Add "const". Move constant strings to read-only memory.Dmitry Stogov2020-09-071-3/+3
| |
* | Avoid fatal error in session handlerNikita Popov2020-08-141-3/+3
| |
* | Merge branch 'PHP-7.4'Nikita Popov2020-08-131-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fixed bug #79724
| * Fixed bug #79724Nikita Popov2020-08-131-1/+1
| |
* | Add many missing closing PHP tags to testsMáté Kocsis2020-08-0932-0/+32
| | | | | | | | Closes GH-5958
* | Only force log startup errors if display_startup_errors disabledNikita Popov2020-08-055-11/+2
| | | | | | | | | | | | Otherwise this results in duplicate errors. Closes GH-5941.
* | Promote "undefined array key" notice to warningNikita Popov2020-08-031-2/+2
| | | | | | | | | | | | | | This implements the last remaining part of the https://wiki.php.net/rfc/engine_warnings RFC. Closes GH-5927.
* | Don't suppress notices in rfc1867 testsNikita Popov2020-08-0313-38/+12
| | | | | | | | | | The references notices in debug builds don't seem to be present anymore.
* | Add a few missing parameter types in stubsMáté Kocsis2020-07-302-1/+13
| | | | | | | | Related to GH-5627
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-07-221-9/+4
|\ \ | |/ | | | | | | * PHP-7.4: Fix brittle test
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-07-221-9/+4
| |\ | | | | | | | | | | | | * PHP-7.3: Fix brittle test
| | * Fix brittle testChristoph M. Becker2020-07-221-9/+4
| | | | | | | | | | | | | | | | | | This test fails occasionally due to timing issues, because the session file may have been unlinked by the first `session_start()`'s GC. We adapt the test expectation to this reality.
* | | Move SessionHandler sanity checks after zppNikita Popov2020-07-171-14/+14
| | |
* | | Review the usage of apostrophes in error messagesMáté Kocsis2020-07-101-2/+2
| | | | | | | | | | | | Closes GH-5590
* | | Remove proto comments from C filesMax Semenik2020-07-062-60/+30
| | | | | | | | | | | | Closes GH-5758
* | | Use zend_string_equals API in a couple placesNikita Popov2020-07-031-2/+1
| | |
* | | Make exit() unwind properlyNikita Popov2020-06-291-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.