Commit graph

1019 commits

Author SHA1 Message Date
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov
fb60ccc666 Merge branch 'PHP-7.4' 2019-09-25 11:03:19 +02:00
Nikita Popov
b8ef7c35ab Increase serialize_lock while decoding session
Avoid leaking state between Serializable::unserialize() and
session_decode().
2019-09-25 11:02:23 +02:00
Craig Duncan
1fc2fec138 Convert session functions arginfo to php stubs 2019-09-18 10:59:57 +02:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Christoph M. Becker
034babbcc1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77911: Wrong warning for session.sid_bits_per_character
2019-04-17 17:25:13 +02:00
Christoph M. Becker
87912ca3b9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77911: Wrong warning for session.sid_bits_per_character
2019-04-17 17:24:36 +02:00
Christoph M. Becker
f0ccd9ffc6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77911: Wrong warning for session.sid_bits_per_character
2019-04-17 17:24:15 +02:00
Christoph M. Becker
d20053a556 Fix #77911: Wrong warning for session.sid_bits_per_character 2019-04-17 17:23:23 +02:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Nikita Popov
4f187b8fbc Make session_cache_expire() arg an integer
This is logically an integer, and the function also returns the old
value as an integer. The fact that the integer needs to be converted
to a string for the ini assignment is an implementation detail.
2019-02-01 16:08:31 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +02:00
Pedro Magalhães
a16aee6cee Fix #76688: Disallow excessive parameters after options array 2018-08-12 15:49:13 +02:00
Pedro Magalhães
2b58ab23c6 Support for samesite cookies with array syntax
Allows using an alternative array argument with
support for the samesite option on the following
functions:
setcookie
setrawcookie
session_set_cookie_params
2018-07-31 12:40:26 +02:00
Frederik Bosch
08b9310e6d implement same site cookie see https://bugs.php.net/bug.php?id=72230 see https://tools.ietf.org/html/draft-west-first-party-cookies-07 see https://scotthelme.co.uk/csrf-is-dead/ 2018-07-31 12:40:24 +02:00
Peter Kokot
a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
67b4c3379a Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY() 2018-07-09 12:46:46 +03:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov
af341213f7 se zval_ptr_dtor_str() instead of zend_string_release_ex(Z_STR(*), 0) 2018-07-04 12:08:07 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
f98721b4e0 Intern auto global name strings in first place 2017-11-29 17:10:51 +03:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Nikita Popov
a57f370e59 Clarify bin_to_readable code
I got a bit of a scare when I first saw this code. Turns out that
the way it's used inlen==outlen and that's why it works.
2017-11-14 21:37:22 +01:00
Anatol Belski
0d1eeeb68d move zend_ato*() to size_t and remove casts 2017-07-28 14:59:31 +02:00
Anatol Belski
6aa9c1911b Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:21:48 +02:00
Anatol Belski
9ff4801159 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:21:20 +02:00
Anatol Belski
eaf5c7cdd4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:20:48 +02:00
Anatol Belski
bd00fe81cc Fixed bug #74833, SID constant created with wrong module number 2017-07-26 13:19:41 +02:00
dreamsxin
072ef62f6e
Add warning for change session id when session is active 2017-07-25 09:27:58 +01:00
Sergei Morozov
9b9184a45a
Fixed bug #74941 - Session fails to start after having headers sent 2017-07-20 07:52:02 +01:00
Sergei Morozov
5b12b46a19 Fixed bug #74936 - session_*() functions trigger a warning in read mode when the session is active 2017-07-18 22:25:22 +02:00
Yasuo Ohgaki
a2d766503a Fixed bug #74514 5 session functions incorrectly warn when calling in read-only/getter mode 2017-07-01 03:32:54 +09:00
Nikita Popov
035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
Xinchen Hui
8f2d3539f2 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed tests when using cumstom php.ini(session.save_handler)
  Fix Bug #74541 Wrong reflection on session_start()
2017-05-09 11:15:32 +08:00
Xinchen Hui
05c90e5994 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed tests when using cumstom php.ini(session.save_handler)
  Fix Bug #74541 Wrong reflection on session_start()
2017-05-09 11:14:40 +08:00
Fabien Villepinte
b39c70b4a7 Fix Bug #74541 Wrong reflection on session_start() 2017-05-08 22:42:09 +02:00
Nikita Popov
7cba31535c
Separate array in session upload progress 2017-01-23 17:19:12 +00:00
Joe Watkins
71a42477ca
Merge branch 'PHP-7.1'
* PHP-7.1:
  Update comment, incorrect since 224aaf94
2017-01-19 10:49:09 +00:00
SjonHortensius
631861e1fa
Update comment, incorrect since 224aaf94
In 224aaf94; the warning was enabled; making the comment above incorrect. I've updated the comment to reflect the current code
2017-01-19 10:48:54 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00