Commit Graph

8003 Commits

Author SHA1 Message Date
Adam Harvey
ba32970710 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update fputcsv() to escape all characters equally.
2013-01-15 15:26:25 +08:00
Adam Harvey
a4191b0aad Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Update fputcsv() to escape all characters equally.
2013-01-15 15:24:21 +08:00
Adam Harvey
9b5cb0e805 Update fputcsv() to escape all characters equally.
At present, backslashes have special case handling within fputcsv(): when one
is encountered within a field that's being escaped, escaping stops until the
next instance of the enclosure character is hit.  This can result in malformed
CSV.

Fixes bug #43225 (fputcsv incorrectly handles cells ending in \ followed by ").
2013-01-15 15:17:45 +08:00
Lars Strojny
97157b376f Merge branch 'PHP-5.4' into PHP-5.5 2013-01-14 18:53:40 +01:00
Lars Strojny
bf9ad4e661 Support BITMAPV5HEADER in getimagesize(): https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.28bitmap_information_header.29 2013-01-14 18:52:38 +01:00
Gustavo Lopes
22390d3393 Add zend_qsort_r & use it in strtr 2013-01-14 17:24:16 +01:00
Gustavo Lopes
1ce5a22589 Merge branch 'PHP-5.4' into PHP-5.5
Conflicts:
	NEWS
2013-01-14 17:19:23 +01:00
Gustavo Lopes
d7bac4f5ba Remove _GNU_SOURCE, add local heap sort 2013-01-14 17:06:52 +01:00
Ben Ramsey
3439a098a0 array_column: Removed array_pluck() alias 2013-01-14 10:04:14 -06:00
Gustavo Lopes
e5029ac40b The compiler can figure this out 2013-01-14 12:22:42 +01:00
Gustavo Lopes
93d1171c47 Remove unused block 2013-01-14 12:22:42 +01:00
Gustavo Lopes
cddbb98ada strtr() with 2nd param array - optimization
About a 1.25x speedup in my test script by writing the result string
only when a match is found and at the end instead of on each iteration.
2013-01-14 12:22:42 +01:00
Gustavo Lopes
2111ee3df5 Refactoring, bugs & leaks 2013-01-14 12:22:41 +01:00
Gustavo Lopes
ccf15cf2dc Optimize strtr w/ 2nd arg array
Fixes bug #63893: poor efficiency of strtr() using array with keys of
very different length.

The implementation is basically all new, which carries some risk with
it.

The algorithm is described in "A Fast Algorithm For Multi-Pattern
Searching" (1994) by Sun Wu and Udi Manber.
2013-01-14 12:22:41 +01:00
Xinchen Hui
be07f815f2 Use zend_unmangle_property_name_ex to save strlen 2013-01-14 17:08:21 +08:00
Ben Ramsey
a1876b6846 array_column: Set array_pluck as an alias for array_column 2013-01-11 17:09:34 -06:00
Ben Ramsey
5bc2854b37 array_column: Implement ability to specify an index column 2013-01-11 16:58:31 -06:00
Ben Ramsey
94d5b2519a Cleaning up a memory leak. 2013-01-11 14:16:20 -06:00
Ben Ramsey
20ab30339d array_column: Adding test for IS_OBJECT and converting object to string 2013-01-11 14:16:19 -06:00
Ben Ramsey
66a02eb25e array_column: Using add_next_index_zval() at nikic's recommendation. 2013-01-11 14:16:19 -06:00
Ben Ramsey
5f6b20a44d array_column: Improved tests 2013-01-11 14:16:19 -06:00
Ben Ramsey
e921d28ae3 array_column: Cleaning up, as recommended in pull request #56 comments 2013-01-11 14:16:19 -06:00
Ben Ramsey
10da6f00b8 Fixing typo in test for array_column() 2013-01-11 14:16:19 -06:00
Ben Ramsey
6a27b890e6 Simplify the code and use zend_hash_next_index_insert() 2013-01-11 14:16:19 -06:00
Ben Ramsey
dc4dfe8ae0 Adding test for columns not present in all rows for array_column(). 2013-01-11 14:16:19 -06:00
Ben Ramsey
a811e5b6f7 Adding tests for the negative results of array_column() 2013-01-11 14:16:19 -06:00
Ben Ramsey
9035a1ed24 Implement new array function array_column()
array_column() returns the values of the specified column from a
multi-dimensional array.
2013-01-11 14:16:19 -06:00
Remi Collet
b3a934bdb3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix test after fix for bug #63943 (Bad warning text from strpos() on empty needle) See commit c05ee74e7f
2013-01-10 11:18:25 +01:00
Remi Collet
f659ec108f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix test after fix for bug #63943 (Bad warning text from strpos() on empty needle) See commit c05ee74e7f
2013-01-10 11:17:53 +01:00
Remi Collet
dc9f0e70b7 Fix test after fix for bug #63943 (Bad warning text from strpos() on empty needle)
See commit c05ee74e7f
2013-01-10 11:14:38 +01:00
Xinchen Hui
6deb8361f3 Merge branch 'PHP-5.4' into PHP-5.5 2013-01-09 10:57:47 +08:00
Xinchen Hui
15aaa9c660 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-09 10:54:23 +08:00
Xinchen Hui
c05ee74e7f Fixed bug #63943 (Bad warning text from strpos() on empty needle) 2013-01-09 10:53:20 +08:00
Pierre Joye
f4142a92b2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - fix the fix for bug #50524
2013-01-07 13:04:29 +01:00
Pierre Joye
a71e91626a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - fix the fix for bug #50524
2013-01-07 13:04:04 +01:00
Pierre Joye
c0fae054c9 - fix the fix for bug #50524 2013-01-07 13:03:12 +01:00
Anatoliy Belsky
8a481c711a fix windows build 2013-01-06 18:37:26 +01:00
Martin Jansen
371372714d Add unit test for mail.log ini setting. 2013-01-06 15:04:27 +01:00
Martin Jansen
4a3bf25e3f Add a timestamp to the mail log.
This patch is loosely based on the one in bug #52126 but instead of
using a UNIX timestamp it uses the date format also being used by
error_log et al.
2013-01-06 15:04:19 +01:00
Lars Strojny
ec2fff80e7 Bug #23955: allow specifiy max age for setcookie() 2013-01-06 03:22:44 +01:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Pierrick Charron
8228597ecc Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
T_END_HEREDOC don't carry a token value anymore since commit 4cf90e06c
Bugfix by Nikita for bug #60097
2012-12-29 23:11:37 -05:00
Pierrick Charron
52e7b0ce2c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix test to work on every libcurl version
  - Fixed typo on "SKIPIF" (causing make test to abort on some systems)
2012-12-21 12:25:34 -05:00
Pierrick Charron
59a4514dc0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix test to work on every libcurl version
  - Fixed typo on "SKIPIF" (causing make test to abort on some systems)

Conflicts:
	tests/output/bug63377.phpt
2012-12-21 12:24:52 -05:00
Pierrick Charron
63659ce526 Fix test to work on every libcurl version 2012-12-21 12:19:54 -05:00
Remi Collet
4d8d5d83fc Fixed Bug #63738 unpack: back result with Z format
Fix result for empty string.
Same output as perl
perl -e 'print unpack("Z2","\0\0");' => ""
perl -e 'print unpack("Z2","A\0");'  => "A"
perl -e 'print unpack("Z2","AB\0");' => "AB"
perl -e 'print unpack("Z2","ABC\0");'=> "AB"
2012-12-11 16:30:08 +01:00
Sebastian Bergmann
eab14993fe Invoke re2c with --no-generation-date to prevent unintentional / unnecessary changes in generated files. 2012-12-06 09:28:35 +01:00
Anatoliy Belsky
17e21925c8 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  This test isn't supposed to pass on windows
2012-11-27 16:13:19 +01:00
Anatoliy Belsky
e0ad33c24a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  This test isn't supposed to pass on windows
2012-11-27 16:11:53 +01:00
Anatoliy Belsky
eff12e56b6 This test isn't supposed to pass on windows 2012-11-27 16:02:55 +01:00
David Soria Parra
c733f28bd9 Add myself to QA 2012-11-21 18:42:01 +01:00
Xinchen Hui
aba80d09e6 Update credits for 5.5 2012-11-21 12:17:41 +08:00
Pierrick Charron
30d659144a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
2012-11-16 18:08:19 -05:00
Pierrick Charron
15ab75be8a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
2012-11-16 18:07:02 -05:00
Pierrick Charron
6dff07aa8c Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
Restore the old behavior but keep bug 51094 fixed
2012-11-16 18:04:14 -05:00
Antony Dovgal
01dee2c4b0 fix bug #63369
(un)serialize() leaves dangling pointers, causes crashes
2012-10-26 16:42:21 +04:00
Antony Dovgal
f2bffdc2e4 fix bug #63369
(un)serialize() leaves dangling pointers, causes crashes
2012-10-26 16:41:14 +04:00
Anthony Ferrara
9aacdf6e89 Merging in Password Hashing API into master
This implements the accepted RFC password_hash https://wiki.php.net/rfc/password_hash
2012-10-16 04:11:37 -04:00
Anthony Ferrara
0bc9ca39ce Refactor to using a stack based zval instead of dynamic allocation 2012-10-07 05:42:08 -04:00
Anthony Ferrara
37b2207f66 Clean up unreported memory leak by switching to zval_ptr_dtor 2012-10-07 05:12:02 -04:00
Anthony Ferrara
76e83f769f fix allocation and copy issue 2012-10-06 12:33:48 -04:00
Anthony Ferrara
1751d5fabe Really fix leaks, add test cases to prove it... 2012-10-06 10:38:41 -04:00
Anthony Ferrara
25b2d364e9 Fix issue with possible memory leak 2012-10-05 15:53:40 -04:00
Anthony Ferrara
4a7d18c79e Fix some double free issues, and more cleanup work 2012-10-05 15:31:58 -04:00
Gustavo Lopes
f8e26d95f2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix bug #63240 on stream_get_line()
2012-10-12 20:24:13 +02:00
Gustavo Lopes
76601c4fd1 Fix bug #63240 on stream_get_line()
stream_get_line() could contain the delimiter string if that string
had more than one character. The bug manifested itself when a read on
the stream ended with part of the delimiter string and the read after
would start with the rest of the delimiter string; provided that
the data of first read did not complete the max length result of the
call to stream_get_line() with the partial delimiter used in that max
length return. In that case, the delimiter will still appear in
the result, divided in two subsequent return values. That is not a bug.

See <http://www.mail-archive.com/internals@lists.php.net/msg61325.html>
2012-10-12 20:23:43 +02:00
Xinchen Hui
45e938ec34 Remove executable permission on phpt 2012-10-10 10:31:53 +08:00
Xinchen Hui
e081c55fb5 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-10 10:31:31 +08:00
Xinchen Hui
610c7fbe7b Remove executable permission on phpt 2012-10-10 10:27:49 +08:00
Xinchen Hui
e4a8fa6a15 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-09 13:29:51 +08:00
Xinchen Hui
6284ef112e Fixed bug #63236 (Executable permission on various source files) 2012-10-09 13:28:31 +08:00
Xinchen Hui
60a280936e Merge branch 'PHP-5.3' into PHP-5.4 2012-10-02 00:30:49 +08:00
Xinchen Hui
4f860a4412 Avoding superfluous function call 2012-10-02 00:28:38 +08:00
Xinchen Hui
af0c22537a Add test for #35895 2012-10-02 00:27:35 +08:00
Remi Collet
79db2855f7 Bug #63147: SKIP_ONLINE_TESTS, for getmxrr 2012-09-30 19:40:52 -07:00
Remi Collet
71c61921f3 Bug #63147: introduce SKIP_ONLINE_TESTS, for gethostbyname 2012-09-30 19:40:43 -07:00
Remi Collet
189b99aee1 gethostbyname_basic002.phpt is a duplicate to gethostbyname_error004.phpt 2012-09-30 19:40:36 -07:00
Stanislav Malyshev
bf064112b7 fix test and move to proper place 2012-09-30 19:24:42 -07:00
husman
491b1efacb Bug #63162 - parse_url does not matches password component 2012-09-30 19:20:37 -07:00
Gustavo Lopes
2634f55992 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #63240 on stream_get_line()
2012-10-12 20:24:28 +02:00
Xinchen Hui
4b152e5470 Merge branch 'PHP-5.4' 2012-10-10 10:32:38 +08:00
Xinchen Hui
75a2c0d715 Merge branch 'PHP-5.4' 2012-10-09 13:30:22 +08:00
Xinchen Hui
62fa875f3e Merge branch 'PHP-5.4' 2012-10-02 00:31:47 +08:00
Stanislav Malyshev
4ba2d546c8 Merge branch 'PHP-5.4'
* PHP-5.4:
  add news for --offline
  add --offline option to run-tests command
  Bug #63147: SKIP_ONLINE_TESTS, for getmxrr
  Bug #63147: introduce SKIP_ONLINE_TESTS, for gethostbyname
  gethostbyname_basic002.phpt is a duplicate to gethostbyname_error004.phpt
2012-09-30 19:41:54 -07:00
Stanislav Malyshev
815248d8fb Merge branch 'PHP-5.4'
* PHP-5.4:
  add bug #63162
  fix test and move to proper place
  synergy ftl. Removed duplicate fields.
  adding test phpt
  Bug #63162 - parse_url does not matches password component
  fix news
2012-09-30 19:28:42 -07:00
Xinchen Hui
8a930c93dd Merge branch 'PHP-5.4' 2012-09-24 19:47:47 +08:00
Xinchen Hui
8cdd6bc1e7 Merge branch 'PHP-5.3' into PHP-5.4 2012-09-24 19:47:28 +08:00
Xinchen Hui
2cbc4053ae Correct the test summary 2012-09-24 19:46:40 +08:00
Xinchen Hui
518fa8c4cf Merge branch 'PHP-5.4' 2012-09-24 11:01:24 +08:00
Xinchen Hui
d9ad532050 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/standard/tests/general_functions/bug60723.phpt
2012-09-24 11:00:58 +08:00
Xinchen Hui
923511d364 Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo)
Cherry pick to 5.3
2012-09-24 10:59:06 +08:00
Xinchen Hui
8fcb4f1107 Merge branch 'PHP-5.4' 2012-09-23 23:00:15 +08:00
Xinchen Hui
395d77c540 Fixed bug #60723 (error_log error time has changed to UTC ignoring default timezo) 2012-09-23 22:59:31 +08:00
Lars Strojny
6793e09a4e Merge branch 'PHP-5.4' 2012-09-18 23:17:31 +02:00
Lars Strojny
ee172ce3cc Merging PR #116 2012-09-18 23:15:03 +02:00
Anthony Ferrara
8bd79d1807 Refactor slightly to enable cleaner readability 2012-09-17 11:43:47 -04:00
Anthony Ferrara
6fd5ba5c8d Fix arg info for required params passed to needs_rehash 2012-09-17 11:10:59 -04:00
Anthony Ferrara
44c2624f8c Fix ucwords error casing 2012-09-17 10:59:51 -04:00
Anthony Ferrara
e034a46bdc A bunch of naming convention fixes. No functionality changes 2012-09-17 10:52:07 -04:00
Anthony Ferrara
83cfff4593 Switch to using an ENUM for algorithms instead of a constant 2012-09-13 10:32:54 -04:00
Anthony Ferrara
7ec80e1a13 Fix incorrect arg info required param count for password_hash 2012-09-12 12:15:33 -04:00
Anthony Ferrara
3e383dc0d5 Merge remote branch 'upstream/master' into hash_password
* upstream/master:
  Generators & UPGRADING
  Capitalize the warning message
  Rearrange the codes, remove empty lines
  Provide a specific error message if date.timezone value is invalid.
  regenerate patch, and save a strlen
  Fix the wrong use of snprintf which is introduced in 1d2f619049
  Fixed unintendent clearance of PHP_OUTPUT_ACTIVATED flag
  Fix doc bug #63032 (Number of release in documentation).
  fixed test for bug #52944 also for darwin
  -enable VC11 (vc2012)
  - Fixed bug #61767 (Shutdown functions not called in certain error situation) - Fixed bug #60909 (custom error handler throwing Exception + fatal error = no shutdown function)
  year++
  correct PHP version & year++
  Correct PHP version
  year++
  - fix build, there was no tsrm context there, doing a fetch but this is horribly slow, this fix needs improvement (or simply add a TSRM context in the signature in master
  - fix build, declarations must be 1st in a contextgit checkout -f master
  Fixed bug #62907 (Double free when use traits)
  Fixed bug #62991 (Segfault with generator and closure)
2012-09-12 11:48:45 -04:00
Anthony Ferrara
76f3295cdf Expose PASSWORD_BCRYPT_DEFAULT_COST constant and update test to use it 2012-09-12 11:47:50 -04:00
Anthony Ferrara
e9a7bde829 Switch test to using strict comparison for crypt fallback 2012-09-12 11:37:56 -04:00
Anthony Ferrara
e8b7f5b35d Add tests for password_get_info and password_needs_rehash 2012-09-12 11:21:08 -04:00
Xinchen Hui
94582f9398 year++
missed the .re files in 5.3
2012-09-05 23:47:51 +08:00
Xinchen Hui
d22f18007f Merge branch 'PHP-5.4' 2012-09-05 23:44:41 +08:00
Xinchen Hui
a3d078bd8f correct PHP version & year++ 2012-09-05 23:43:59 +08:00
Xinchen Hui
63d9c1f40b Merge branch 'PHP-5.4'
Conflicts:
	sapi/litespeed/lsapi_main.c
2012-09-05 23:20:42 +08:00
Xinchen Hui
9d44ff640c Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/interbase/interbase.rc
2012-09-05 23:11:19 +08:00
Xinchen Hui
d64d9e3351 year++ 2012-09-05 23:08:05 +08:00
Anthony Ferrara
db41f9fe60 Refactoring to use size_t instead of int most places 2012-09-04 11:34:00 -04:00
Anthony Ferrara
824f1f4581 Merge remote branch 'upstream/master' into hash_password
* upstream/master: (393 commits)
  forked two tests for windows
  Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
  Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
  Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice).
  Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
  Fixed bug #50997 (SOAP Error when trying to submit 2nd Element of a choice)
  Bug #49510: Boolean validation fails with FILTER_NULL_ON_FAILURE with empty string or false
  Implemented ReflectionFunction::isGenerator()
  Allow null as a default value for length in mb_substr() and mb_strcut()
  Allow null as a default value for length in mb_substr() and mb_strcut()
  folder
  Initializing optional argument description in assert()
  Initializing optional argument description in assert()
  Fix test failed due to new Token T_YIELD
  fix NEWS
  Fix leak when yielding array as key
  Drop obsolete test
  Remove extra blank in notice message, should act as same as vm
  Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables)
  assert() user message
  ...
2012-09-04 10:29:22 -04:00
Lars Strojny
89948c7fbe Initializing optional argument description in assert() 2012-09-02 08:01:32 +02:00
Lars Strojny
e212de4a44 Initializing optional argument description in assert() 2012-09-02 08:01:18 +02:00
Gustavo Lopes
53351d087d Merge branch 'generators'
* generators: (70 commits)
  Fix typos
  Fix segfault when traversing a by-ref generator twice
  Make sure that exception is thrown on rewind() after closing too
  Remove implementation stubs for yield delegation
  Fix several issues and allow rewind only at/before first yield
  Run finally if generator is closed before finishing
  Finally with return now works in generators too
  Add dedicated opcode for returns from a generator
  Disallow serialization and unserialization
  Fix zts build (typo)
  Drop Generator::close() method
  Forgot to add test
  Support trivial finally in generators (no yield, no return)
  Fix implementation of Iterator interface
  Add T_YIELD in tokenizer_data.c
  Throw error also for return occuring before yield
  Fix throwing of exceptions within a generator
  Remove reference restrictions from foreach
  Require parenthesis around yield expressions
  Add some more tests
  ...
2012-09-01 19:07:20 +02:00
Lars Strojny
e658a91b3d assert() user message
Added 2nd, optional, param to assert. When passed in it will be added
to the printed warnings and passed as a 4th param to a callback. PR 150
by Lonny Kapelushnik
2012-08-31 19:04:53 +02:00
Lars Strojny
64c168efc5 Tests for the previous assert() with user message 2012-08-31 19:01:57 +02:00
Lars Strojny
167108d73c assert() user message
Added 2nd, optional, param to assert. When passed in it will be added
to the printed warnings and passed as a 4th param to a callback. PR 150
by Lonny Kapelushnik
2012-08-31 18:55:43 +02:00
Anthony Ferrara
e05413ca59 Remove password_make_salt() from the implementation 2012-08-28 11:24:33 -04:00
Nikita Popov
6517ed0215 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2012-08-24 13:29:40 +02:00
Lars Strojny
aaa2eee4c0 Bug 62462: adjusting test 2012-08-21 10:09:05 +02:00
Lars Strojny
a45e81d093 Bug 62462: adjusting test 2012-08-21 10:08:46 +02:00
Lars Strojny
18bb426587 Bug 62462: Prevent multibyte characters from being split between the lines
Merged from https://github.com/php/php-src/pull/120
2012-08-20 23:47:20 +02:00
Lars Strojny
c54d73d54c Bug 62462: Prevent multibyte characters from being split between the lines
Merged from https://github.com/php/php-src/pull/120
2012-08-20 23:46:50 +02:00
Nikita Popov
1823b16fa1 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Merging master to fix Windows build

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
2012-08-20 13:37:53 +02:00
Stanislav Malyshev
9ccf854198 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix for #62844
  relative-scheme
  bug #62844; relative URL schemes in parse_url()
2012-08-19 22:20:30 -07:00
Andrew Faulds
4ec29b945c relative-scheme 2012-08-19 22:16:07 -07:00
Andrew Faulds
36b88d77f2 bug #62844; relative URL schemes in parse_url() 2012-08-19 22:15:58 -07:00
Felipe Pena
64e4279642 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Value stored to var is never used
2012-08-19 14:50:54 -03:00
Felipe Pena
d6e6db4501 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Value stored to var is never used
2012-08-19 14:50:52 -03:00
Felipe Pena
3dd256a67b - Value stored to var is never used 2012-08-19 14:50:49 -03:00
Felipe Pena
01c3e0e62c Merge branch 'PHP-5.4'
* PHP-5.4:
  - Value stored to var is never used
2012-08-19 14:34:46 -03:00
Felipe Pena
9d8d84ebdf Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Value stored to var is never used
2012-08-19 14:34:42 -03:00
Felipe Pena
50ab6c63a7 - Value stored to var is never used 2012-08-19 14:34:38 -03:00
Felipe Pena
2b685075b5 - Remove unused variable 2012-08-19 11:35:18 -03:00
Xinchen Hui
3d93c88811 Merge branch 'PHP-5.4' 2012-08-17 18:30:03 +08:00
Xinchen Hui
0b23da1c74 Fixed bug #62836 (Seg fault or broken object references on unserialize()) 2012-08-17 18:28:32 +08:00
Nikita Popov
9a38bd66c8 Fix php_ini_loaded_file() test
If running ./run-tests.php directly there isn't necessarily an ini file,
so the function can also return false.
2012-08-16 17:46:34 +02:00
Xinchen Hui
8848778a59 Merge fix e7535e06e6 to 5.3
thanks for reeze.xia@gmail.com notice this
2012-08-15 01:06:10 +08:00
Xinchen Hui
dacd918dc7 Merge branch 'PHP-5.4' 2012-08-14 14:03:56 +08:00
Xinchen Hui
8091256948 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-14 14:03:05 +08:00
Xinchen Hui
da14cdd6f3 Merge branch 'skip-memory-exhaust-tests' of https://github.com/reeze/php-src into PHP-5.3 2012-08-14 13:58:15 +08:00
Nikita Popov
7066be50c0 Merge remote-tracking branch 'reeze/fix-phpcredits-bc' 2012-08-13 21:23:06 +02:00
Nikita Popov
f4ce364628 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
This is just an intial merge. It does not yet make generators and finally
work together.

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	Zend/zend_vm_execute.skl
	Zend/zend_vm_opcodes.h
2012-08-13 16:54:53 +02:00
Xinchen Hui
253760bb6b Merge branch 'PHP-5.4' 2012-08-12 21:00:01 +08:00
Xinchen Hui
dda0565b53 Merge branch 'PHP-5.3' into PHP-5.4 2012-08-12 20:58:45 +08:00
Xinchen Hui
4970926e45 Fixed bug #62763 (register_shutdown_function and extending class) 2012-08-12 20:58:09 +08:00
Reeze Xia
0239437903 Skip tests reply on Zend MM turned on
Those two tests have expect memory exhausted fatal error
2012-08-11 00:34:37 +08:00
Reeze Xia
3d4169d751 Fix phpcredits() BC after remove Logo GUIDs
This test was affected: ext/standard/tests/general_functions/phpcredits2.phpt
see https://github.com/php/php-src/pull/132/files#diff-3
This makes constant PHP_CREDITS_FULLPAGE didn't functional anymore.
2012-08-09 21:43:59 +08:00
Stanislav Malyshev
054e41f4ae Merge branch 'PHP-5.4'
* PHP-5.4:
  News for bug#40459
  fix bug #40459 - make all stream funcs that create object call ctor
2012-08-09 00:12:22 -07:00
Stanislav Malyshev
4db70fd406 fix bug #40459 - make all stream funcs that create object call ctor 2012-08-07 22:59:12 -07:00
Stanislav Malyshev
c9eb64127e Merge branch 'pull-request/132'
* pull-request/132:
  OK, bye bye JavaScript, let's just include credits before license
  Nicer (JSLint-compliant!) credits reveal JavaScript
  Removed now-unnecessary expose_php checks for logo
  Fixed small misalignment in prev commit
  Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
2012-08-05 21:15:53 -07:00
Stanislav Malyshev
13763c76db Merge branch 'PHP-5.4'
* PHP-5.4:
  var_export outputs an E_WARNING when recursion is detected
2012-08-05 20:58:46 -07:00
Lonny Kapelushnik
45f3322905 var_export outputs an E_WARNING when recursion is detected 2012-08-05 20:56:06 -07:00
Xinchen Hui
6f9b638aed Merge branch 'PHP-5.4' 2012-08-02 19:24:23 +08:00
Xinchen Hui
6fb9a6922d Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/standard/tests/file/realpath_cache.phpt
2012-08-02 19:23:04 +08:00
Xinchen Hui
9a690859f6 fix test due to float value 2012-08-02 19:14:06 +08:00
Xinchen Hui
9c73c8d58d Merge branch 'PHP-5.4' 2012-07-29 14:31:22 +08:00
Xinchen Hui
e0c014dead Merge branch 'PHP-5.3' into PHP-5.4 2012-07-29 14:31:04 +08:00
Xinchen Hui
f419d614ba Sike test while there is no zend mm max_size guard 2012-07-29 14:30:01 +08:00
Felipe Pena
777160f7b5 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed ZTS build
  Updated NES
2012-07-24 10:02:43 -03:00
Felipe Pena
54cba5aa91 - Fixed ZTS build 2012-07-24 10:02:32 -03:00
Florian Anderiasch
81de111131 Merge branch 'PHP-5.4'
* PHP-5.4:
  Add syslog support to mail.log #62356
2012-07-24 14:34:41 +02:00
Florian Anderiasch
ddc8d16245 Add syslog support to mail.log #62356
Patch by Michael Orlitzky
2012-07-24 14:31:30 +02:00
Andrew Faulds
b1a997e2a2 OK, bye bye JavaScript, let's just include credits before license 2012-07-23 00:11:00 +01:00
Xinchen Hui
ead076bac6 Fix test failed 2012-07-21 23:27:09 +08:00
Xinchen Hui
683b4f7a2b merge 9eb5cb6571 to 5.3 2012-07-21 00:46:32 +08:00
Xinchen Hui
da7cd966ff Merge branch 'PHP-5.4'
* PHP-5.4:
  this initialization is unnecessary anymore after commit 2d9d2cadad
2012-07-18 21:49:46 +08:00
Xinchen Hui
b81b8bf77d this initialization is unnecessary anymore after commit 2d9d2cadad 2012-07-18 21:45:37 +08:00
Xinchen Hui
e7535e06e6 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build)
2012-07-18 20:17:42 +08:00
Xinchen Hui
2d9d2cadad Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build) 2012-07-18 20:16:27 +08:00
Xinchen Hui
2ed4026518 Merge branch 'PHP-5.4'
* PHP-5.4:
  skip for ZTS
2012-07-18 19:48:27 +08:00
Xinchen Hui
11d0558928 skip for ZTS 2012-07-18 19:47:54 +08:00
Xinchen Hui
44462955f8 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix test (dos2unix, typo)
2012-07-18 19:25:56 +08:00
Xinchen Hui
282a6659aa fix test (dos2unix, typo) 2012-07-18 19:25:22 +08:00
Xinchen Hui
ecc960e862 Merge branch 'PHP-5.4'
* PHP-5.4:
  fix test, the key may be a float value
2012-07-18 19:22:13 +08:00
Xinchen Hui
41a9c681a0 fix test, the key may be a float value 2012-07-18 19:21:25 +08:00
Gustavo André dos Santos Lopes
08302e3d03 Merge branch '5.4'
* 5.4:
  NEWS for b47d6b32
  Fix test fails: ext/standard/tests/general_functions/bug27678.phpt
2012-07-17 23:13:43 +02:00
Reeze Xia
b47d6b32ba Fix test fails: ext/standard/tests/general_functions/bug27678.phpt
After commit 3e62aae1, number_format() returns string with length,
but _php_math_number_format_ex_len() didn't set string length
on nan and inf. This cause segfault when destruct the return value.
2012-07-17 23:08:11 +02:00
Andrew Faulds
c7c2fb0158 Nicer (JSLint-compliant!) credits reveal JavaScript 2012-07-15 14:41:53 +01:00
Stanislav Malyshev
05f4e3e52a Merge branch 'PHP-5.4'
* PHP-5.4:
  Typofix in test-description
2012-07-14 22:08:27 -07:00
Stanislav Malyshev
cfdccdb805 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Typofix in test-description
2012-07-14 22:08:19 -07:00
Jille Timmermans
86b4252c8e Typofix in test-description 2012-07-14 22:07:50 -07:00
Stanislav Malyshev
6bfea28ce3 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixing up closing tag
  Testing variation on input parameters of http_build_query() function
2012-07-14 19:00:35 -07:00
Adam Gegotek
8b70dd202a Fixing up closing tag 2012-07-14 18:59:04 -07:00
Adam Gegotek
152f73f92a Testing variation on input parameters of http_build_query() function 2012-07-14 18:58:52 -07:00
Andrew Faulds
ee6540ad09 Removed now-unnecessary expose_php checks for logo 2012-07-14 23:20:45 +01:00
Stanislav Malyshev
3b0573363a fix comment 2012-07-14 14:50:50 -07:00
Stanislav Malyshev
582514d4c7 fix for bug#18556 - use simple tolower() function for internal things 2012-07-14 14:50:50 -07:00
Andrew Faulds
92d2aeb234 Fixed small misalignment in prev commit 2012-07-14 21:55:11 +01:00
Andrew Faulds
d12f8d6790 Removed Logo GUIDs and replaced with Data URIs and div hidden with JS
- removed php_logo_guid()
- removed php_egg_logo_guid()
- removed php_real_logo_guid()
- removed zend_logo_guid()
- removed logo GUID handling
- removed logo GUIDs from source
- added logo data URIs instead for phpinfo()
- added credits to phpinfo() page, but hidden by default
2012-07-14 21:44:21 +01:00
Felipe Pena
f94051ea11 - Fix conflict 2012-07-14 12:23:24 -03:00
Felipe Pena
0bff7cfadd - Fixed bug #62565 (Crashes due non-initialized internal properties_table) 2012-07-14 12:16:16 -03:00
Anthony Ferrara
707c9073b5 Switch second parameter to password_make_salt to be a flag 2012-07-11 22:15:56 -04:00
Anthony Ferrara
99b7956ad5 Merge remote branch 'upstream/master' into hash_password
* upstream/master: (34 commits)
  Fixed Bug #62500 (Segfault in DateInterval class when extended)
  Fixed test bug #62312 (warnings changed one more time)
  fix valgrind warning
  fix valgrind warning
  fixed #62433 test for win
  update NEWS
  Fixed bug #62499 (curl_setopt($ch, CURLOPT_COOKIEFILE, "") returns false)
  appease MSVC (doesnt like unary minus of unsigned ints)
  appease MSVC (doesnt like unary minus of unsigned ints)
  appease MSVC (doesnt like unary minus of unsigned ints)
  - Fixed bug #62507 (['REQUEST_TIME'] under mod_php5 returns miliseconds instead of seconds)
  Fixed Bug #62500 (Segfault in DateInterval class when extended)
  Added in NEWS and UPGRADING for feature 55218
  Fix two issues with run-tests.php
  Fix potential integer overflow in nl2br
  Fix potential integer overflow in bin2hex
  This wil be PHP 5.3.16
  Revert change 3f3ad30c50: There shouldn't be new features in 5.3, especially not if they aren't in 5.4, too.
  fix (signed) integer overflow (part of bug #52550
  fix (signed) integer overflow (part of bug #52550
  ...
2012-07-10 10:33:51 -04:00
Anthony Ferrara
9d3630b5dc Cleanup whitespace issues 2012-07-05 17:58:19 -04:00
Anthony Ferrara
ee7e799841 Implement password_get_info() function 2012-07-05 17:46:33 -04:00
Anthony Ferrara
db86d54446 Fix issue with int vs long parameter 2012-07-05 17:31:40 -04:00
Anthony Ferrara
5160dc11cd Implement password_needs_rehash() function 2012-07-05 16:22:49 -04:00
Nikita Popov
ed54357fcd Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix potential integer overflow in nl2br
  Fix potential integer overflow in bin2hex
2012-07-05 21:00:16 +02:00
Nikita Popov
5cf2f87fa7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix potential integer overflow in nl2br
  Fix potential integer overflow in bin2hex

Conflicts:
	ext/standard/string.c
2012-07-05 20:59:18 +02:00
Nikita Popov
157ddd9577 Fix potential integer overflow in nl2br
The buffer size was calculated manually, thus creating integer overflows
for very large inputs, e.g. nl2br(str_repeat("\n", 613566757)).

The code now uses safe_emalloc, thus making the code throw an error
instead of crashing.
2012-07-05 20:41:54 +02:00
Nikita Popov
88f46b162b Fix potential integer overflow in bin2hex
The code was already using safe_emalloc but did the multiplication in
the first argument, thus making the use of safe_emalloc pretty useless.

The *2 is now moved to the second argument.
2012-07-05 20:14:49 +02:00
Anthony Ferrara
886527de56 Update signature info for changing algo to an ordinal 2012-07-03 08:26:50 -04:00
Anthony Ferrara
6943f2ab7f Some more refactoring, make algo no longer optional 2012-07-03 08:24:31 -04:00
Anthony Ferrara
6cc3c65fbf Remove php.ini setting for default bcrypt cost 2012-07-03 07:33:55 -04:00
Stanislav Malyshev
a3322f8927 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed the common misspelling of the word occurred (occured -> occurred)
2012-06-30 17:00:25 -07:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Anthony Ferrara
f53112fdcf Update password.c to use safe_emalloc in sensitive places 2012-06-29 11:37:39 -04:00
Anthony Ferrara
9c1445c6bc More refactoring of crypt into php_crypt, and fixing memory allocation 2012-06-29 11:32:25 -04:00
Anthony Ferrara
9e18e578f0 Merge remote branch 'upstream/master' into hash_password
Conflicts:
	ext/standard/crypt.c
2012-06-29 10:29:58 -04:00
Nikita Popov
0b96fb4af5 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix some lengths in crypt()
2012-06-29 13:15:53 +02:00
Nikita Popov
d86b6ea35c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix some lengths in crypt()

Conflicts:
	ext/standard/crypt.c
2012-06-29 13:15:35 +02:00
Nikita Popov
e6cf7d7745 Fix some lengths in crypt()
Use salt_len_in instead of strlen(salt) or PHP_MAX_SALT_LEN, otherwise too
much memory will be allocated.

sha512 has a 86 character checksum, not 43. That probably was a copy&paste
from the sha256 code which indeed has 43.

The allocation also was using sizeof(char *), thus allocating 4 or 8 times
as much memory as necessary. The sizeof(char *) was removed in the 5.4
branch in b7a92c9 but forgotten on 5.3.

The memset 0 call was using PHP_MAX_SALT_LEN which can be smaller than the
output buffer and thus not zeroing out everything. Use the size of the
output buffer (needed) instead.
2012-06-29 13:11:43 +02:00
Anthony Ferrara
63318772ae Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
2012-06-28 20:38:31 -04:00
Anthony Ferrara
34ab5650bc Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
2012-06-28 20:36:21 -04:00
Anthony Ferrara
7e8276ca68 Fixed bug #62443 (Crypt SHA256/512 Segfaults With Malformed Salt)
Fixed a memory allocation bug in crypt() SHA256/512 that can
cause segmentation faults when passed in salts with a null byte
early.
2012-06-28 20:00:03 -04:00
Anthony Ferrara
da3d8bf514 Refactor password.c a bit, add different error checking 2012-06-28 15:29:40 -04:00
Anthony Ferrara
6bb3865a23 Refactor crypt to use an external working function 2012-06-28 14:44:04 -04:00
Anthony Ferrara
0dd2f16b14 Fix formatting issues in password.c 2012-06-27 11:04:41 -04:00
Anthony Ferrara
5f44be03af Add tests and error checking for large salt requested values to prevent overflow on allocation 2012-06-26 23:09:08 -04:00
Anthony Ferrara
2b9591f11f Update tests to check ini setting 2012-06-26 22:13:51 -04:00
Anthony Ferrara
e505316aeb Add tests for password hashing 2012-06-26 22:05:25 -04:00
Anthony Ferrara
232da90388 Implement php.ini setting password.bcrypt_cost 2012-06-26 21:15:56 -04:00
Anthony Ferrara
2d4b7cb653 Refactor salt generation, rename password_create to password_hash 2012-06-25 21:22:16 -04:00
Anthony Ferrara
41d7374ea4 Implement openssl support for make_salt 2012-06-25 11:37:48 -04:00
Anthony Ferrara
618f262956 More error checking, and some cleaning up for password.c 2012-06-25 08:50:39 -04:00
Anthony Ferrara
18d3bd9481 Basic random generator added to make_salt 2012-06-25 08:15:17 -04:00
Moriyoshi Koizumi
88cf472b92 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix bug #62373 (serialize() generates wrong reference to the object)
2012-06-25 19:16:40 +09:00
Moriyoshi Koizumi
91e1df704e Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:14:19 +09:00
Moriyoshi Koizumi
e427182279 Fix bug #62373 (serialize() generates wrong reference to the object) 2012-06-25 19:13:23 +09:00
Anthony Ferrara
f7097d99ff Fix memory leak on branch 2012-06-24 23:36:09 -04:00
Anthony Ferrara
657402832b Implement password_verify 2012-06-24 23:35:26 -04:00
Anthony Ferrara
7e41980fe4 Actually complete password_create() 2012-06-24 23:25:18 -04:00
Anthony Ferrara
c77f2c2958 Base structure for passsword_create and password_make_salt 2012-06-24 22:44:43 -04:00
Nikita Popov
ee8b9d5c6f Merge branch 'PHP-5.4'
* PHP-5.4:
  Fix memory allocation checks for base64 encode
2012-06-25 00:09:05 +02:00
Nikita Popov
ad641950b3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fix memory allocation checks for base64 encode
2012-06-24 23:56:55 +02:00
Nikita Popov
5b3f4d25ea Fix memory allocation checks for base64 encode
base64_encode used safe_emalloc, but one of the arguments was derived from a
multiplication, thus making the allocation unsafe again.

There was a size check in place, but it was off by a factor of two as it
didn't account for the signedness of the integer type.

The unsafe allocation is not exploitable, but still causes funny behavior
when the sized overflows into a negative number.

To fix the issue the *4 factor is moved into the size argument (where it is
known to be safe), so safe_emalloc can carry out the multiplication.

The size check is removed as it doesn't really make sense once safe_emalloc
works correctly. (Would only cause base64_encode to silently return false
instead of throwing an error. Also could cause problems with other uses of
the base64 encoding API, which all don't check for a NULL return value.)

Furthermore the (length + 2) < 0 check is replaced with just length < 0.
Allowing lengths -2 and -1 doesn't make sense semantically and also is not
honored in the following code (negative length would access unallocated
memory.)

Actually the length < 0 check doesn't make sense altogether, but I left it
there just to be safe.
2012-06-24 23:32:50 +02:00
Johannes Schlüter
21cbe30be3 Merge branch 'PHP-5.4'
* PHP-5.4:
  Remove extra ;
2012-06-22 17:33:38 +02:00
Johannes Schlüter
5e23a047ac Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove extra ;
2012-06-22 17:33:22 +02:00
Johannes Schlüter
a62d4e2c43 Remove extra ; 2012-06-22 17:32:46 +02:00
Stanislav Malyshev
784b4cddc6 simplify boolval() 2012-06-13 12:03:36 -07:00
Pierrick Charron
5b10a65617 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
2012-06-07 17:51:56 +02:00
Pierrick Charron
494c170e6f Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
2012-06-07 17:45:43 +02:00
Pierrick Charron
fed5923dbc Fixed bug #51094 (parse_ini_file() with INI_SCANNER_RAW cuts a value that includes a semi-colon)
Modify the scanner to check if the first char of the raw data is an opening " in which case we
need to find the closing one. Otherwise just search for the next end of value char [\r\n;\000]
2012-06-07 17:44:20 +02:00
Jille Timmermans
74b4ef5036 Implement boolval() with a test 2012-06-06 22:34:51 +02:00
Xinchen Hui
4770fe2c97 Merge branch 'PHP-5.4'
* PHP-5.4:
  Typofix in comment in proc_open.c
2012-05-30 14:44:35 +08:00