Christoph M. Becker
f99c69fc2e
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81518 : Header injection via default_mimetype / default_charset
2021-10-14 12:23:43 +02:00
Christoph M. Becker
b7f3b67060
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81518 : Header injection via default_mimetype / default_charset
2021-10-14 12:21:35 +02:00
Christoph M. Becker
365769366b
Fix #81518 : Header injection via default_mimetype / default_charset
...
We forbid setting these INI options to values containing NUL bytes, CR
or LF.
Closes GH-7574.
2021-10-14 12:16:19 +02:00
Ben Ramsey
daf6a46177
The PHP-8.1 branch is now for 8.1.0RC5
2021-10-12 18:50:51 -05:00
Derick Rethans
9733d49e14
Remove now superfluous tests due to changes in tzdata
2021-10-08 13:51:21 +01:00
Christoph M. Becker
41e0081901
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix #81475 : stream_isatty emits warning with attached stream wrapper
2021-09-29 13:49:15 +02:00
Christoph M. Becker
e2d9ca7b19
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81475 : stream_isatty emits warning with attached stream wrapper
2021-09-29 13:47:13 +02:00
Christoph M. Becker
23e13e2c8f
Fix #81475 : stream_isatty emits warning with attached stream wrapper
...
We must not issue warnings, if `show_err` is false.
Closes GH-7513.
2021-09-29 13:44:09 +02:00
Ben Ramsey
68ee1b40fc
The PHP-8.1 branch is now for 8.1.0RC4
2021-09-28 16:34:46 -05:00
Nikita Popov
f79bd08573
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix leak of invalid stream_read() return value
2021-09-28 15:58:05 +02:00
Nikita Popov
2f798d99b7
Fix leak of invalid stream_read() return value
...
Fixes oss-fuzz 6225190686687232 (part of #38542 ).
2021-09-28 15:57:55 +02:00
Tim Starling
c96be7b8f2
Use ASCII lower case for misc case folding
...
Use ASCII case conversion instead of locale-dependent case conversion in
the following places:
* grapheme_stripos() and grapheme_strripos() in the "fast" path
* ldap_get_entries()
* oci_pconnect() for case folding of parameters when constructing a key
into the connection or session pool
* SoapClient: case folding of function names
* get_meta_tags(): case conversion of property names
* http stream wrapper: header names
* phpinfo(): anchor names
* php_verror(): docref URLs
* rfc1867.c: Content-Type boundary parameter name
* streams.c: stream protocol names
Using locale-dependent case folding for these cases is either
unnecessary or actively incorrect. These functions could have
misbehaved when used with certain locales (e.g. Turkish).
Closes GH-7511.
2021-09-24 09:20:08 +02:00
Nikita Popov
9bff96396d
Don't leak header callback if headers already sent
...
We need to avoid storing it in the first place, as we don't
really have a good place to release it later. If headers haven't
been sent yet, send_headers will do this. sapi_deactive happens
too late in the shutdown sequence and will result in leak reports.
2021-09-16 15:31:27 +02:00
Patrick Allaert
cba708bbb6
Configuring for 8.1.0RC3
2021-09-14 18:17:42 +02:00
Sara Golemon
5e1e4a8963
Prep for 8.0.12
2021-09-07 15:16:11 +00:00
Patrick Allaert
d6d6491153
Preparing for 8.1.0RC2
2021-09-01 18:22:32 +02:00
Nikita Popov
27901e0f6a
Restore dev version
2021-09-01 09:56:54 +02:00
Patrick Allaert
5764414eb8
Prepare for PHP 8.1.0RC1
2021-08-31 18:57:44 +02:00
MARiA so cute
aec08cc841
Improve the success rate when use mkdir() in multiprocessing environment ( #7383 )
...
Improve the success rate when use mkdir() in multiprocessing environment
2021-08-18 12:34:04 +02:00
Nikita Popov
9574627552
Clean up recursive mkdir logic
...
Rewrite this as a loop with a single VCWD_MKDIR call and a
subsequent advance to the next directory.
2021-08-17 14:20:44 +02:00
Nikita Popov
3c7ff25fbe
Reduce nesting in mkdir implementation
2021-08-17 12:25:38 +02:00
Christoph M. Becker
e9b28528d6
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #81346 : Non-seekable streams don't update position after write
2021-08-10 16:51:56 +02:00
Christoph M. Becker
a2b92d6baa
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81346 : Non-seekable streams don't update position after write
2021-08-10 16:50:36 +02:00
Christoph M. Becker
4a1af1f871
Fix #81346 : Non-seekable streams don't update position after write
...
The stream position is not related to the buffer, and needs to be
updated for non-seekable streams as well. The erroneous condition
around the position update is a relict of an old commit[1].
The unexpected test expectation is due to bug #81345 .
[1] <088e2692c3 >
Closes GH-7356.
2021-08-10 16:49:07 +02:00
Christoph M. Becker
4ff82eb96a
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #81302 : Stream position after stream filter removed
2021-08-10 16:42:03 +02:00
Christoph M. Becker
2e71c94c9b
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81302 : Stream position after stream filter removed
2021-08-10 16:41:14 +02:00
Christoph M. Becker
40b31fcc80
Fix #81302 : Stream position after stream filter removed
...
When flushing the stream filters actually causes data to be written to
the stream, we need to update its position, because that is not done by
the streams' write methods.
Closes GH-7354.
2021-08-10 16:39:55 +02:00
Nikita Popov
e14fbc84ac
Remove FORMAT_CONV_MAX_PRECISION
...
This used to be necessary in the past because the NUM_BUF_SIZE
was set to 512, which is shorter than DOUBLE_MAX_LENGTH. Now the
value is either DOUBLE_MAX_LENGTH or larger (2048).
2021-08-02 15:59:26 +02:00
Nikita Popov
d28f6e694d
Move php_gcvt to zend_gcvt
...
Also move PHP_DOUBLE_MAX_LENGTH to ZEND_DOUBLE_MAX_LENGTH.
2021-08-02 14:51:46 +02:00
Christoph M. Becker
ccb6642c91
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #81294 : Segfault when removing a filter
2021-07-27 12:17:07 +02:00
Christoph M. Becker
bf9afc184f
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #81294 : Segfault when removing a filter
2021-07-27 12:14:22 +02:00
Christoph M. Becker
1fa26eccba
Fix #81294 : Segfault when removing a filter
...
We need to call the proper method.
Closes GH-7308.
2021-07-27 12:12:02 +02:00
Nikita Popov
21d9931007
Fix user ini parsing under RC_DEBUG
...
Suppress checking during the actual parsing, but make sure to
duplicate strings on activate. The parsing result may be shared
across requests, but activation should work on per-request strings.
2021-07-21 09:14:31 +02:00
Nikita Popov
1da5df8029
Don't enable rc_debug mode if module startup fails
2021-07-21 09:14:15 +02:00
Nikita Popov
a4db74364d
Remove THREAD_LS
...
This sounds like it will give you a thread local storage, but in
truth ... it does absolutely nothing.
2021-07-19 16:15:31 +02:00
George Peter Banyard
0ba155cd57
Make syslog() binary safe
...
Closes GH-7245
Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com >
2021-07-15 19:08:26 +02:00
Christoph M. Becker
29e5e4719c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #72595 : php_output_handler_append illegal write access
2021-07-15 15:31:39 +02:00
Christoph M. Becker
c6b7f6c39f
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #72595 : php_output_handler_append illegal write access
2021-07-15 15:29:48 +02:00
Christoph M. Becker
a942cf5b02
Fix #72595 : php_output_handler_append illegal write access
...
We must make sure that `handler->buffer.size + grow_max` does not
overflow, so we're using `safe_erealloc()` instead.
Closes GH-7241.
2021-07-15 15:26:42 +02:00
George Peter Banyard
282abfed95
Drop register keyword
2021-07-15 10:40:36 +02:00
George Peter Banyard
02e48d99c9
Use standard 64bit signed int type
2021-07-15 10:40:36 +02:00
George Peter Banyard
97785545cf
Use standard 64bit unsigned int type
2021-07-15 10:40:36 +02:00
George Peter Banyard
b901c0528c
Refactor conversion function
...
Use a size_t instead of int because it tracks the size of the string
Cast to int to maintain the C stdlib API
2021-07-15 10:40:36 +02:00
George Peter Banyard
2bf68b3c01
Remove unused macro
2021-07-15 10:40:36 +02:00
George Peter Banyard
5e4d727f6a
Use standard bool type instead of boolean_e
2021-07-15 10:40:36 +02:00
George Peter Banyard
10f416f5c2
Use standard bool type instead of bool_int
2021-07-15 10:40:36 +02:00
Sara Golemon
7dc35ac8a7
Bump to 8.0.10
2021-07-13 14:10:35 +00:00
Nikita Popov
efbb2198d4
Return value from ZEND_ATOL
...
Instead of assigning it as part of the macro itself, which makes
usage quite awkward.
2021-07-12 16:51:24 +02:00
twosee
6086e174be
Remove unnecessary sockaddr memory allocation ( #7219 )
...
The size of sockaddr_in and sockaddr_in6 is known on compile-time and it is not that big for the stack.
Also optimized the code.
2021-07-09 10:38:19 +08:00
Nikita Popov
083d7f5886
Reduce stack usage in php_resolve_path()
...
tsrm_realpath() internally always allocates a string. If the out
parameter is provided it gets copied there and freed. What we
were doing here was to first copy the path from the allocated
string to a stack buffer, and then copy it from the stack buffer
to a zend_string. We might as well save one copy and one buffer.
2021-07-02 11:45:16 +02:00