Commit Graph

1153 Commits

Author SHA1 Message Date
Yasuo Ohgaki
17beba686e Bug #61470 is fixed only in master 2015-02-03 12:26:01 +09:00
Yasuo Ohgaki
e93042998a Fixed bug #61470 - session_regenerate_id() does not create session file.
Made session_regenerate_id() raise error for wrong usage.
2015-02-03 12:23:00 +09:00
Yasuo Ohgaki
92576c7c49 XFAIL broken test for now.
Partially fixed test session.save_path difference.
2015-02-03 03:05:03 +09:00
Adam Harvey
fea4c22266 Merge branch 'PHP-5.6' 2015-02-02 11:32:03 +00:00
Adam Harvey
05d591dfdf Merge branch 'PHP-5.5' into PHP-5.6 2015-02-02 11:31:54 +00:00
Adam Harvey
9d8b1170aa Let's not assume bash is always /bin/bash. 2015-02-02 11:31:10 +00:00
Yasuo Ohgaki
c7eea5a79b Merge branch 'PHP-5.6'
* PHP-5.6:
  Add test for bug #61470. It is already fixed.
2015-02-02 18:41:25 +09:00
Yasuo Ohgaki
675a12bbcf Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add test for bug #61470. It is already fixed.
2015-02-02 18:39:48 +09:00
Yasuo Ohgaki
fb803ff819 Add test for bug #61470. It is already fixed. 2015-02-02 18:39:07 +09:00
Yasuo Ohgaki
f248df9003 Cleanup trans sid code. Behavior is unchanged.
Fixed possible injections. Escape values usually internal safe values.
2015-02-02 17:06:16 +09:00
Xinchen Hui
f1981365f5 Fixed #68966 (php7 make file ext/session/mod_mm.lo failed) 2015-02-02 14:24:41 +08:00
Yasuo Ohgaki
d8803d8147 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed typo in comment
2015-02-01 05:15:27 +09:00
Yasuo Ohgaki
d9a9afa499 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed typo in comment
2015-02-01 05:14:56 +09:00
Yasuo Ohgaki
c8a12508c7 Fixed typo in comment 2015-02-01 05:14:27 +09:00
Michael Wallner
330d158e93 fix warning 2015-01-30 20:11:25 +01:00
Anatol Belski
bc5686f5d2 remove unused variable 2015-01-30 10:30:45 +01:00
Yasuo Ohgaki
7f52978c67 Remove excessive macros 2015-01-29 19:48:50 +09:00
Yasuo Ohgaki
07a5dfca5b Merge branch 'PHP-5.6'
* PHP-5.6:
  Use bash rather than sh
2015-01-29 15:27:24 +09:00
Yasuo Ohgaki
7b06cc8d22 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Use bash rather than sh
2015-01-29 15:27:08 +09:00
Yasuo Ohgaki
d463ddd3c7 Use bash rather than sh 2015-01-29 15:21:17 +09:00
Xinchen Hui
d96eb4b0a8 reorder the branches 2015-01-29 12:50:56 +08:00
Xinchen Hui
18c647cce2 Merge branch 'master' of https://git.php.net/repository/php-src 2015-01-29 12:35:44 +08:00
Xinchen Hui
14396a3264 ppid must be IS_STRING 2015-01-29 12:35:18 +08:00
Yasuo Ohgaki
70b2d2eefa Use proper type 2015-01-29 13:31:40 +09:00
Xinchen Hui
4da7e4de29 The argument must be not changed in session_start 2015-01-29 12:26:13 +08:00
Yasuo Ohgaki
7a97eaf25d Cleanup session id files after test 2015-01-29 10:31:39 +09:00
Yasuo Ohgaki
f90f6108c8 Merge branch 'master' into master-rfc-session-lock4
Conflicts:
	UPGRADING
2015-01-29 09:55:36 +09:00
Yasuo Ohgaki
14d68d3641 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed Bug #68941 mod_files.sh is a bash-script
2015-01-29 09:31:21 +09:00
Yasuo Ohgaki
5f28622e09 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed Bug #68941 mod_files.sh is a bash-script
2015-01-29 09:29:11 +09:00
Yasuo Ohgaki
abf9e2ea09 Fixed Bug #68941 mod_files.sh is a bash-script 2015-01-29 09:25:28 +09:00
Xinchen Hui
a0cf025134 Fixed #68868 (Segfault in clean_non_persistent_constants() in SugarCRM 6.5.20) 2015-01-28 17:12:23 +08:00
Yasuo Ohgaki
e71099bc4e Remove legacy code 2015-01-28 16:01:10 +09:00
Yasuo Ohgaki
4d747b1356 Forgot to apply important peace of patch 2015-01-28 14:22:22 +09:00
Yasuo Ohgaki
feeaaa4c3f Fixed crash 2015-01-28 08:03:37 +09:00
Yasuo Ohgaki
7b17980875 Update UPGRADING and UPGRADING.INTERNALS 2015-01-26 06:14:40 +09:00
Yasuo Ohgaki
0c9bfa96b2 Make session_decode return FALSE when it fails.
Fix a test.
Use proper types.
2015-01-25 15:26:00 +09:00
Yasuo Ohgaki
e6c8640a2a WIP - test passes 2015-01-22 13:34:58 +09:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
7b6ed8db2f almost all the replacements of TSRMLS_* are done
Some places have to be yet touched as they use different/custom
macros namings for the same. Also some places in the code became
redundant now, this is the next task. To name some: ext/mysqlnd,
sapi/embed, ext/curl and some smaller places here and there.
2014-12-14 14:22:42 +01:00
Anatol Belski
e112f6a04e second shot on removing TSRMLS_* 2014-12-14 14:07:59 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
c6bad96f30 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (398 commits)
  NEWS
  add test for bug #68381
  Fixed bug #68381 Set FPM log level earlier during init
  proper dllexport
  move to size_t where zend_string is used internally
  fix some datatype mismatches
  return after the warning, to fix uninitialized salt usage
  fix datatype mismatches
  add missing type specifier
  fix datatype mismatches
  fix unsigned check
  "extern" shouldn't be used for definitions
  joined identical conditional blocks
  simplify fpm tests
  SEND_VAR_NO_REF optimization
  Add test for bug #68442
  Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode
  Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client
  Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments.
  Add new FPM test for IPv4/IPv6
  ...

Conflicts:
	win32/build/config.w32
2014-11-18 21:18:52 +01:00
Yasuo Ohgaki
9e072d9565 Remove unneeded md5 hashing from PHP-5.6 branch.
It's removed from master already by my previous commit.
2014-11-12 13:43:54 +09:00
Yasuo Ohgaki
6b8328de74 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68331 - This was partial patch for https://wiki.php.net/rfc/session-lock-ini
  Fixed 2 tests that expects bool retrun value from save handler.

Conflicts:
	ext/session/session.c
2014-11-06 13:49:43 +09:00
Yasuo Ohgaki
4dd3fbfcd2 Fixed bug #68331 - This was partial patch for https://wiki.php.net/rfc/session-lock-ini 2014-11-06 13:06:29 +09:00
Anatol Belski
7a6a3d923b fix arg order, CFLAGS is the fifth arg in m4 2014-10-17 16:03:40 +02:00
Anatol Belski
fea10f6a5e ext/iconv, ext/json and ext/session use static tsrmls pointer 2014-10-17 14:16:40 +02:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Nikita Popov
43f1c94dda Review a few more SEPARATE_ZVAL_IF_NOT_REF usages 2014-10-09 12:51:05 +02:00
Anatol Belski
2edcd125d7 cleanup TSRMLS_FETCH in ext/session 2014-09-26 21:15:21 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
bccc653185 Avoid double IS_INTERNED() check 2014-09-19 17:32:50 +04:00
Anatol Belski
5777aa51d9 fix signed/unsigned mismatch 2014-09-16 21:17:24 +02:00
Anatol Belski
49e78dd022 reduce struct size by 8 byte on 64 bit 2014-09-13 23:34:08 +02:00
Adam Harvey
d91717f458 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #67972 (SessionHandler Invalid memory read create_sid()).
  Update LSAPI to 6.7, added support for 'filter_input'. Fixed a crash in CLI mode.
  5.5.18 now
2014-09-08 19:31:58 +00:00
Adam Harvey
0cbfdc9df5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #67972 (SessionHandler Invalid memory read create_sid()).
  Update LSAPI to 6.7, added support for 'filter_input'. Fixed a crash in CLI mode.
  5.5.18 now

Conflicts:
	configure.in
	main/php_version.h
2014-09-08 19:28:15 +00:00
Adam Harvey
bc44eb6172 Fix bug #67972 (SessionHandler Invalid memory read create_sid()).
SessionHandler::create_sid() didn't check if PS(default_mod) was initialised
before attempting to call its create_sid() handler.
2014-09-08 19:25:14 +00:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Anatol Belski
a9c5dab1d0 revert the lstat part 2014-08-29 17:21:02 +02:00
Anatol Belski
f9b051241a fix stat vs zend_stat 2014-08-29 13:43:40 +02:00
Anatol Belski
451856420c data type fixes 2014-08-29 12:53:37 +02:00
Anatol Belski
257ed4061a 's' works with size_t round 2 2014-08-27 20:49:33 +02:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Nikita Popov
95fac3cee3 Fix session handlers in zts
Also use ZEND_HASH_FOREACH API.
2014-08-27 00:26:21 +02:00
Xinchen Hui
dc6cd48efb Fixed incompatible pointer 2014-08-26 12:19:06 +08:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Tjerk Meesters
86674b5837 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed #67694: Regression in session_regenerate_id()

Conflicts:
	ext/session/session.c
2014-08-23 09:21:36 +08:00
Tjerk Meesters
ce9bdae33f Fixed #67694: Regression in session_regenerate_id() 2014-08-23 09:18:02 +08:00
Anatol Belski
6d54e89916 Merge remote-tracking branch 'php/master' 2014-08-20 21:29:49 +02:00
Anatol Belski
4b337a898b fix directory separator in test 2014-08-20 21:27:39 +02:00
Anatol Belski
53a8d8e627 Merge remote-tracking branch 'php/master' 2014-08-20 00:34:17 +02:00
Anatol Belski
f07b41b465 fix incompatible types 2014-08-19 14:20:56 +02:00
Anatol Belski
48e6adeee2 ported ext/session 2014-08-19 14:18:24 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Dmitry Stogov
753813e542 Restored "???" mark in the place that might be changed later 2014-08-14 10:46:17 +04:00
Xinchen Hui
35dd200430 clean up - remove checked questions 2014-08-13 16:44:22 +08:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Stanislav Malyshev
f281a315f7 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix NEWS
  Fix missing type checks in various functions
2014-07-28 00:39:24 -07:00
Stanislav Malyshev
c41ca94824 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix missing type checks in various functions

Conflicts:
	ext/openssl/openssl.c
2014-07-28 00:37:32 -07:00
Stanislav Malyshev
531be9662f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix missing type checks in various functions
2014-07-28 00:34:27 -07:00
Stanislav Malyshev
b4a4db467b Fix missing type checks in various functions 2014-07-27 02:42:49 -07:00
Dmitry Stogov
f2a2fccece Merge branch 'master' into phpng
* master:
  fix nmake snap when ext name is different in target dll
  force atoll macro usage on windows
  Enable $ replacement in exif, ldap, pdo_pgsql and tidy
  See bug #67635
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
  Improve fix for #66608
  Fixed segfault with empty break
  New added opcodes don't need to be resloved
  Update NEWS
  Update NEWS
  Update NEWS
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
  implemented copy libs of core exts in phpize mode
  fix copy the ext dll into the prefix path in phpize mode
  fix default prefix in phpize mode
  fix file with zero size usage in phpize mode

Conflicts:
	Zend/zend_opcode.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/session/session.c
2014-07-22 15:42:17 +04:00
Xinchen Hui
9bef96d96e Merge branch 'PHP-5.5' into PHP-5.6 2014-07-19 13:12:36 +08:00
Yasuo Ohgaki
5ed63b3bfc Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
2014-07-19 10:00:10 +09:00
Yasuo Ohgaki
d0d5a1c444 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
2014-07-19 09:59:51 +09:00
Yasuo Ohgaki
f83a6c33b4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
2014-07-19 09:53:04 +09:00
Yasuo Ohgaki
e946de29d2 Fixed bug #66827 Session raises E_NOTICE when session name variable is array 2014-07-19 09:52:31 +09:00
Dmitry Stogov
8ce2f2caac Merge branch 'master' into phpng
* master:
  Fix still broken session test.  Only return true/false.
  Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
  Followup fix to custom session save handlers
  create locales and re-add test
  rm test for now

Conflicts:
	ext/session/tests/session_set_save_handler_class_012.phpt
2014-07-08 11:32:29 +04:00
Sara Golemon
6e9bc95f67 Fix still broken session test. Only return true/false. 2014-07-07 14:30:28 -07:00
Sara Golemon
7c2489751c Followup fix to custom session save handlers
2d9885c introduced some regressions.  This addresses those.

  * Don't throw return type notice or session write failure when in an exception
  * Fix tests to properly return true/false since null is no longer falsy/successy
  * Rerecord a few tests to accomodate difference in raised warnings
2014-07-07 12:59:54 -07:00
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