Commit Graph

1003 Commits

Author SHA1 Message Date
Dmitry Stogov
bce6a36c8a Merge branch 'master' into test
* master: (48 commits)
  change locale - looks like not everybody has sl_SI
  Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
  fix format
  Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting)
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
  Fix handling of session user module custom handlers.
  Reference bug report instead of github issue in NEWS file
  add more exts for Travis
  Update NEWS
  Fix phpdbg.1 man page installation when build != src directory
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA
  Update NEWS
  Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  ...

Conflicts:
	ext/opcache/zend_accelerator_util_funcs.c
	ext/session/mod_user.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/standard/file.c
	ext/standard/streamsfuncs.c
	ext/standard/string.c
	main/streams/memory.c
2014-07-07 19:21:23 +04:00
Dmitry Stogov
e4450cddd4 Wrong expectation in test (for some reason error messages didn't refer to right functions) 2014-07-07 17:22:19 +04:00
Sara Golemon
2d9885c8cb Fix handling of session user module custom handlers.
According to the documentation, returning TRUE from
user based session handlers should indicate success,
while returning FALSE should indicate failure.

The existing logic relied on casting the return value
to an integer and returning that from the function.
However, the internal handlers use SUCCESS/FAILURE
where SUCCESS == 0, and FAILURE == -1, so the following
behavior map occurs:

  return false; => return 0; => return SUCCESS
  return true; => return 1; => return <undefined>

Since the session API checks against FAILURE,
both boolean responses wind up appearing like "not FAILURE".

This diff reasserts boolean responses to behave as
documented and introduces some special handling
for integer responses of 0 and -1 so that code can be
written for older and newer versions of PHP.
2014-07-06 09:40:35 -07: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
Andrea Faulds
2b5d25d1fc Merge branch 'httponly-cookies' of https://github.com/mj/php-src 2014-06-12 10:03:14 +01:00
Xinchen Hui
f2d1ace1b4 This should be this (broken compiling before) 2014-05-19 10:26:10 +08:00
Martin Jansen
068bf645e1 Remove usage of pointless COOKIE_SET_COOKIE constant. 2014-05-18 10:45:31 +02:00
Pierre Joye
0ba3aec5f7 only used if HAVE_NOFOLLOW 2014-05-17 05:50:01 +02:00
Dmitry Stogov
7fcd4064c0 Merge branch 'master' into phpng
* master: (41 commits)
  fix test - output can be chunked
  fix test
  fix test
  Fixed test for commit 997be125eb
  Add bug fix to NEWS
  Update UPGRADING according to bug fix
  fix test
  improve CURL tests to allow testing without separate server
  improve CURL tests to allow testing without separate server
  Fixed bug #67199	mb_regex_encoding mishmash
  Fix bug #67248 (imageaffinematrixget missing check of parameters)
  Fix bug #67247	spl_fixedarray_resize integer overflow
  fix news
  add tests stuff to README
  Updated NEWS
  Fix Linux specific fail in error traces (cherry-picked and fix for bug #67245) Linux apparently does not like memcpy in overlapping regions...
  - Fixed off-by-one in phar_build (patch by crrodriguez at opensuse dot org)
  - Move checking
  - Fixed missing NULL check in SimpleXMLElement::xpath()
  - Fixed missing NULL check
  ...

Conflicts:
	ext/bz2/bz2.c
	ext/gd/gd.c
	ext/mbstring/php_mbregex.c
	ext/session/tests/031.phpt
	ext/simplexml/simplexml.c
	ext/spl/spl_fixedarray.c
2014-05-13 15:24:40 +04:00
Felipe Pena
920d298f4a - Fixed ZTS build 2014-05-13 00:34:10 -03:00
Xinchen Hui
8d87e3b841 Refactoring wddx (incompleted, is there any one use it? ) 2014-05-11 22:04:45 +08:00
Ferenc Kovacs
0cd679fb17 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed tests (they might fail from time to time because of session GC)
  Fix author name on the #63228 patch.
2014-05-07 00:39:57 +02:00
Ferenc Kovacs
d2f283884f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed tests (they might fail from time to time because of session GC)
  Fix author name on the #63228 patch.
2014-05-07 00:38:57 +02:00
Ferenc Kovacs
579898e338 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed tests (they might fail from time to time because of session GC)
  Fix author name on the #63228 patch.
2014-05-07 00:38:32 +02:00
Dmitry Stogov
f880013c4d Fixed tests (they might fail from time to time because of session GC) 2014-05-07 00:37:56 +02:00
Martin Jansen
71ad601dee Fix typo 2014-05-06 22:08:52 +02:00
Martin Jansen
c5f9a231d5 Streamlining of cookie handling in ext/session and setcookie
Up until now the session cookie used "HttpOnly" to indicate cookies
only available through HTTP while setcookie() used "httponly".  The
relevant RFC 6265 claims that case does not matter for this token,
but only explicitely mentions "HttpOnly".  Thus this seems like a
logical choice when streamlining the code.

Also the setcookie implementation now uses the same string constants
as the session extension for other tokens like Max-Age or the domain
attribute.

This change poses a slight risk of backwards incompatibility in places
where people deliberately ignore chapter 5.2.5 of RFC 6265 and perform
case-sensitive checks for the HttpOnly attribute.
2014-05-06 22:00:59 +02:00
Martin Jansen
c0f4e270a8 This test requires the hash extension. 2014-05-06 21:34:10 +02:00
Xinchen Hui
d8651fbe1c Make they are in the same style of Z_ISREF 2014-05-03 16:08:58 +08:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
7584ae3200 Fixed compilaation warnings 2014-04-22 18:52:59 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Anatol Belski
634e6b61d9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix windows build
2014-04-14 23:34:50 +02:00
Anatol Belski
793f67e852 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix windows build
2014-04-14 23:30:14 +02:00
Anatol Belski
24b72e7a27 fix windows build 2014-04-14 23:29:38 +02:00
Stanislav Malyshev
99b01fb3d7 ws fix 2014-04-14 13:35:59 -07:00
Stanislav Malyshev
8bc82718ae Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #66942: openssl_seal() memory leak
  ws fix

Conflicts:
	ext/openssl/openssl.c
2014-04-14 13:35:24 -07:00
Stanislav Malyshev
56f9727305 ws fix 2014-04-14 13:16:53 -07:00
Stanislav Malyshev
41569b1029 Fix bug #66171: better handling of symlinks 2014-04-14 10:51:31 -07:00
Stanislav Malyshev
7f43aeb167 Fix bug #66171: better handling of symlinks 2014-04-14 10:46:45 -07:00
Stanislav Malyshev
40a9316dff Fix bug #66171: better handling of symlinks 2014-04-14 10:44:53 -07:00
Dmitry Stogov
dac8cefb45 Fixed tests (added session_destroy() to avoid side effects on the following tests) 2014-04-11 13:17:59 +04:00
Dmitry Stogov
4adedff13d Fixed tests (they might fail from time to time because of session GC) 2014-04-11 12:43:35 +04:00
Xinchen Hui
70ba20bfd3 hmm, make it consistent 2014-04-11 12:54:42 +08:00
Xinchen Hui
12470b4092 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-04-11 12:34:06 +08:00
Dmitry Stogov
6bfedfd22e Fixed unserialize() 2014-04-10 18:08:11 +04:00
Dmitry Stogov
6df6006769 Compatibility fix for ext/session/tests/session_id_error3.phpt 2014-04-10 12:29:14 +04:00
Dmitry Stogov
23aecd1736 Fixed test (it requires ext/hash) 2014-04-10 12:14:11 +04:00
Xinchen Hui
27f7f342ee session_id is binary safe now 2014-04-10 11:57:34 +08:00
Dmitry Stogov
3d17219cd8 Refactored zend_hash_* iteration API zend_hash_fove_forward_ex(ht, pos) and family require second argument to be real pointer.
&(ht)->nInternalPointer should be passed instead of NULL.
zend_hash_update_current_key() may work only with internal pointer.
2014-04-07 23:14:17 +04:00
Xinchen Hui
fa2e7ba0cb Fixed retval for ps_call_handler 2014-03-29 20:17:59 +08:00
Xinchen Hui
5c1595ca8e Refactor session (incompleted) 2014-03-29 17:39:26 +08:00
Xinchen Hui
3647fc6fcc Refactor session (incompleted) 2014-03-28 18:46:25 +08:00
Xinchen Hui
c9bca5039b Refactor session (incompleted) 2014-03-26 23:23:54 +08:00
Yasuo Ohgaki
973f379efc Remove unneeded test 2014-03-13 06:54:52 +09:00
Yasuo Ohgaki
6f0ad9ea12 Revert "Implement Bug #54649 Create session_serializer_name()"
This reverts commit 678ec30655.

Conflicts:
	ext/session/tests/session_serializer_name_basic.phpt
2014-03-13 06:32:49 +09:00
Yasuo Ohgaki
7dec5789fe Revert "Implemented Request #11100 (session_gc() function)."
This reverts commit 54a42f0d0c.

Conflicts:
	ext/session/tests/session_gc_basic.phpt
2014-03-13 06:30:32 +09:00
Dmitry Stogov
040dea8b82 Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore. 2014-03-05 11:10:52 +04:00
Anatol Belski
1cb4398ac1 primitive test fixes 2014-02-28 09:43:57 +01:00