Commit Graph

182 Commits

Author SHA1 Message Date
Peter Kokot
cbc785dc8c Remove AC_STRUCT_TM macro
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_STRUCT_TM`.

This macro checks if `struct tm` is defined in either `<sys/time.h>` or
`<time.h>` and defines the `TM_IN_SYS_TIME` symbol accordingly. This
check was relevant in times before the C89 for some embedded systems,
microcontrollers or very old systems. For newer systems it can be
avoided and the `<time.h>` should be included instead since current
systems should be well supported by now. [2]

Since PHP requires at least C89, this patch removes the obsolescent call
and time.h checks.

Refs:

- [1]: http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
- [2]: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Structures.html
2018-08-29 21:22:47 +02:00
Xinchen Hui
5c1a2d8375 Fixed same bug #76755 in setrawcookie 2018-08-17 16:19:26 +08:00
Xinchen Hui
0a16af043e Cheaper checking 2018-08-17 15:21:48 +08:00
Xinchen Hui
751bbaa41f Micro optimization & fixed invalid key handling 2018-08-17 14:56:24 +08:00
Xinchen Hui
d61ff37f45 Fixed bug #76755 (setcookie does not accept "double" type for expire time) 2018-08-17 13:45:43 +08: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
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
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
Christoph M. Becker
5cb825df72 Fix #69948: path/domain are not sanitized in setcookie
For improved security, characters not allowed for name and value should
also be forbidden for path and domain.
2018-03-24 17:32:30 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Dmitry Stogov
9c2a1f52a5 Avoid useless dereferences and separations during paramter passing. 2017-06-19 12:55:59 +03:00
Nikita Popov
430eea84b8 Merge branch 'PHP-7.1' 2017-04-09 13:15:04 +02:00
Craig Duncan
ba6561d3cc Fixed bug #72071: Prevent Max-Age from being negative 2017-04-09 13:14:40 +02:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Mitch Hagstrand
32ab889ea4 Fix header_remove function, the name parameter is optional 2016-12-30 19:13:46 -08:00
Sara Golemon
b71b12843c Use new param API in standard 2016-12-30 13:36:51 -08:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Christoph M. Becker
405f8b5c91 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #67131: setcookie() conditional for empty values not met

Resolved conflicts:
	ext/standard/head.c
2015-08-24 23:11:03 +02:00
Christoph M. Becker
fc203fa37e Fix #67131: setcookie() conditional for empty values not met
PHP applies a workaround for old MSIE where setting an empty cookie value would
not delete the cookie. This workaround is only triggered if an empty string (or
a value that converts to an empty string) is actually given as $value parameter
of setcookie. If the $value parameter is omitted, an empty cookie value is
sent. This commit fixes the inconsistent behavior.
2015-08-24 23:03:50 +02:00
Bob Weinand
4df77a6c58 Fixed bug #70295 (Segmentation fault with setrawcookie) 2015-08-19 01:33:19 +02:00
Xinchen Hui
70d7ecfec6 Use zend_string in setcookie (save value reallocated) 2015-07-02 12:04:28 +08:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Christoph M. Becker
613f747579 prohibit empty cookie names for setcookie() 2015-05-12 10:47:35 +02:00
Anatol Belski
9ef0c39b2b Removed erroneous condition
This condition is always false. Furthermore headers_list() is
documented to always return an array.
2015-02-06 09:41:02 +01:00
Stanislav Malyshev
93f0b8142b fix BC break in headers_list 2015-02-05 20:24:16 -08:00
Anatol Belski
b5d3c5ca8d follow up fix for headers sent, checking a reference would be always true as well 2015-02-04 18:13:27 +01:00
Anatol Belski
55cefb2814 fix condition
the headers member is allocated together with the SAPI globals struct
2015-02-03 17:52:19 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Remi Collet
9aabfeb6c4 fix string is optional, set default length, thanks laruence 2014-12-02 07:41:35 +01:00
Remi Collet
67fc5d6bbb Fix type of string length in zpp call
Fix 23 failed tests (detected on bigendian)
2014-12-02 07:06:10 +01:00
Anatol Belski
c448023bd0 fix datatype mismatches 2014-10-23 10:30:03 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
60373b2ac2 fix signature 2014-08-27 22:17:16 +02:00
Anatol Belski
bf96ee95ce 's' works with size_t round 4 2014-08-27 20:49:37 +02:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Anatol Belski
202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
745a71be33 yet more fixes to zpp 2014-08-20 14:46:14 +02:00
Anatol Belski
cb25136f4e fix macros in the 5 basic extensions 2014-08-16 11:37:14 +02:00
Dmitry Stogov
b108267f2c Merge branch 'master' into phpng
* master: (41 commits)
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  Update copyright year to 2014
  NEWS
  Fix Request #67453 Allow to unserialize empty data.
  Update copyright year to 2014
  Update copyright year for re2c generated files
  Update copyright year to 2014
  Update copyright year for re2c files as well
  Fix patch for bug #67436
  fix failed test
  Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
  Added tests for bug 67436
  Fixed wrong XFAIL test - already fixed
  Fix typo in Bug #67406 NEWS entry
  Fix typo in Bug #67406 NEWS entry
  ...

Conflicts:
	Zend/zend_compile.c
	ext/session/session.c
	ext/standard/array.c
	ext/standard/http_fopen_wrapper.c
	tests/classes/bug63462.phpt
2014-06-18 17:50:27 +04:00
Dmitry Stogov
c1965f58d4 Use reference counting instead of zval duplication 2014-06-05 16:04:11 +04:00
Martin Jansen
068bf645e1 Remove usage of pointless COOKIE_SET_COOKIE constant. 2014-05-18 10:45:31 +02:00