Commit Graph

13460 Commits

Author SHA1 Message Date
Christoph M. Becker
39a67f8074
[ci skip] Improve latest NEWS entries to point to actual bug report 2022-05-27 17:00:16 +02:00
Calvin Buckley
2920a26636
Quote when adding to connection string in (PDO_)ODBC
Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the string
in case users are relying on this behaviour. However, they must be
quoted, or the arguments will be invalid (or possibly more injected).
This means users had to quote arguments or append credentials to the raw
connection string themselves.

It seems that ODBC quoting rules are consistent enough (and that
Microsoft trusts them enough to encode into the .NET BCL) that we can
actually check if the string is already quoted (in case a user is
already quoting because of this not being fixed), and if not, apply the
appropriate ODBC quoting rules.

This is because the code exists in main/, and are shared between
both ODBC extensions, so it doesn't make sense for it to only exist
in one or the other. There may be a better spot for it.

Closes GH-8307.
2022-05-27 16:56:44 +02:00
Arnaud Le Blanc
059474a846 [ci skip] NEWS, UPGRADING 2022-05-27 14:08:22 +02:00
Jihwan Kim
af20923a0f
Fix datetime format string to follow POSIX spec in ftp_mdtm()
Closes GH-8259
2022-05-24 19:23:47 -05:00
Ilija Tovilo
a5a89cc222
Fix stream_wrapper_unregister() resource leak
Closes GH-8548
Closes GH-8587
2022-05-21 18:49:43 +02:00
David Carlier
2410e378c1
Add SO_MEMINFO socket option for gathering socket related info 2022-05-20 22:06:53 +01:00
Christoph M. Becker
33fc9e5a77
Build ext/zip as shared library by default on Windows
This allows users to use PECL/zip, which is well maintained and often
brings new features which are not yet available in ext/zip, as drop-in
replacement for the official Windows php-src builds.

Closes GH-8549.
2022-05-20 14:31:32 +02:00
Derick Rethans
46b35c6a50 [ci skip] Update NEWS 2022-05-20 11:18:49 +01:00
David Carlier
1f4830f21a
Add TCP_NOTSENT_LOWAT socket option
Can be used to limit the amount of unsent data per socket.

Closes GH-8559.
2022-05-16 16:01:38 +02:00
Christoph M. Becker
c8c470a100
[ci skip] Order NEWS sections alphabetically 2022-05-16 15:30:07 +02:00
pandaLIU
72d83709d9
Fix parse_url(): can not recognize port without scheme
Closes GH-7844.
2022-05-16 12:03:35 +02:00
David Carlier
10921525e6
Add CURLOPT_MAXFILESIZE_LARGE option
Like other *LARGE options, it takes a 64 bit value.

Closes GH-8557.
2022-05-16 11:01:28 +02:00
Arnaud Le Blanc
8b6e5e4b43 [ci skip] NEWS 2022-05-13 12:56:09 +02:00
Pavel Djundik
12702a2047 Add "N" and "o" format specifiers to idate() 2022-05-13 09:36:43 +01:00
Derick Rethans
1eab5b7970 GH-8458: DateInterval::createFromDateString does not throw non-relative items are present 2022-05-11 13:52:12 +01:00
Ollie Read
f590782b60
Add ReflectionMethod::hasPrototype method
Closes GH-8487.
2022-05-09 16:48:54 +02:00
Nicolas Grekas
be11bcb0b1
Add ReflectionFunction::isAnonymous()
Closes GH-8499.
2022-05-09 12:56:10 +02:00
Arnaud Le Blanc
5b71b66c27 [ci skip] NEWS 2022-05-06 18:43:08 +02:00
David CARLIER
31692a16af
Support zend alloc USE_ZEND_ALLOC_HUGE_PAGES option on MacOS
ZEND_MM_CHUNK_SIZE fits the VM_FLAGS_SUPERPAGE_SIZE_2MB special
file descriptor for mmap call.
2022-04-29 22:12:25 +01:00
Jakub Zelenka
4ec92c6253 Update NEWS and www.conf with listen.backlog default change 2022-04-23 13:25:08 +01:00
David Carlier
7a45dcfe2e
Introduce CURLOPT_XFERINFOFUNCTION
`CURLOPT_XFERINFOFUNCTION` is available as of cURL 7.32.0, and
supersedes `CURLOPT_PROGRESSFUNCTION` which is still supported by
latest cURL, though.

Closes GH-7823.
2022-04-22 18:09:06 +02:00
David CARLIER
7be195caa7
Support fpm_get_socket_listening_queue on macOS
Using TCP_CONNECTION_INFO socket option.
2022-04-15 21:21:43 +01:00
bohwaz
2973b9f02a
Allow user to change SQLITE_DEFENSIVE if needed
Closes GH-8200.
2022-04-11 17:08:48 +02:00
David Carlier
7bb2a9ff38
Add extra check for FPM proc dumpable on SELinux based systems
The deny_ptrace is a OS runtime setting and is off by default,
at least on workstations flavors (fedora) however it might be
different on production servers.
2022-04-08 17:07:58 +01:00
Paragon Initiative Enterprises
afd8f84c1a
Add sodium_crypto_stream_xchacha20_xor_ic()
There are many use-cases where a PHP user is currently using sodium_compat's implementation of this low-level XChaCha20 API. For example, multi-part message processing (in low-memory settings) for a ciphertext that was encrypted with XChaCha20-Poly1305 (rather than the secretstream API).

Adding this function to ext/sodium offers better performance and lowers users' memory usage with the polyfill, and ensures that users coming from other languages that provide libsodium bindings have a more consistent experience with our bindings. This is a win-win.

This patch follows the libsodium precedent of adding functions instead of optional parameters to existing functions. The parameter order is also consistent with the C API.

https://doc.libsodium.org/advanced/stream_ciphers/xchacha20#usage

Closes GH-8276.
2022-04-04 15:43:42 +02:00
David Carlier
2874e5fa05 FPM: Emit error for invalid port setting 2022-04-03 21:24:46 +01:00
Ilija Tovilo
733023b2e3
Improve error message class type
Refer to interfaces/enums instead of classes in more places.

Closes GH-7792
Closes GH-8187
2022-03-20 20:54:36 +01:00
Ilija Tovilo
0db03c4110
Improve sesson write failure message for user error handlers
Closes GH-7787
Closes GH-8186
2022-03-11 15:08:16 +01:00
Ilija Tovilo
e3ef7bbbb8
Adjust filename/lineno for constant expressions
Closes GH-7771
Closes GH-8124
2022-03-09 18:41:04 +01:00
Patrick Allaert
67440096c5
Added: [zend_]memory_reset_peak_usage() (#8151) 2022-03-04 13:24:08 +01:00
Calvin Buckley
dfd2a80b69
Fix #80909: crash with persistent connections in PDO_ODBC
When we have a complex connection string (more than a DSN), PHP
appends a UID and PWD if none are present and a username and password
are called, so SQLDriverConnect works as expected.

However, it seems spprintf doesn't allocate with persistence if
required. As a result, it'll be considering leaking and crash PHP on
free when a persistent connection is used.

Closes GH-8110.
2022-02-21 12:47:48 +01:00
Christoph M. Becker
f06ac9a486
Fix GH-7939: Cannot unserialize IntlTimeZone objects
As it is now, `IntlTimeZone`, `IntlCalendar` and `IntlDateFormatter`
and some other intl class instances can be serialized, but the
representation is meaningless, and unserialization yields uninitialized/
unusable objects.  To prevent users from noticing this too late, we deny
serialization of such objects in the first place.

Closes GH-7945.
2022-02-17 15:06:29 +01:00
Ilija Tovilo
2f5295692f
Optimize stripos/stristr
Closes GH-7847
Closes GH-7852

Previously stripos/stristr would lowercase both the haystack and the
needle to reuse strpos. The approach in this PR is similar to strpos.
memchr is highly optimized so we're using it to search for the first
character of the needle in the haystack. If we find it we compare the
remaining characters of the needle manually.

The new implementation seems to perform about half as well as strpos (as
two memchr calls are necessary to find the next candidate).
2022-01-31 21:44:31 +01:00
Christoph M. Becker
30a3280df7
Oracle Client 10g is no longer supported
Thus, we drop respective config option for Windows.
2021-12-15 22:09:58 +01:00
Yannis Guyon
38460c2c94
Implement php_handle_avif() using libavifinfo
See #80828 and the internals@ mailing list discussion at
https://externals.io/message/116543

Use libavifinfo's AvifInfoGetFeaturesStream() in php_handle_avif() to
get the width, height, bit depth and channel count from an AVIF
payload. Implement stream reading/skipping functions and data struct.
Use libavifinfo's AvifInfoIdentifyStream() in php_is_image_avif().

Update the expected features read from "test1pix.avif" in
getimagesize.phpt.

Closes GH-7711.
2021-12-15 20:27:40 +01:00
Yurun
3be0ce653b
Report wireless network interfaces on Windows too
There is no particular reason to exclude wireless network interfaces
from the results of `net_get_interfaces()` on Windows, especially since
`getifaddrs(3)` includes these as well.

Closes GH-7718.
2021-12-05 16:05:31 +01:00
Ben Ramsey
07fcf5e2d6
intl: Update grandfathered and redundant language tags
Closes GH-7641.
2021-11-12 13:43:17 -06:00
Christopher Jones
9cd7f41fac
Add oci8.prefetch_lob_size 2021-11-12 17:59:22 +11:00
Ben Ramsey
db8952dd5f
Merge branch 'PHP-8.1' 2021-11-09 18:16:05 -06:00
Ben Ramsey
89f28fafca
The PHP-8.1 branch is now for 8.1.0 2021-11-09 17:49:14 -06:00
Nikita Popov
425e70c11c Fix bug #81441
Zero-initialize the sa4/sa6 structures. On musl sin6_scope_id is
used by getnameinfo() without NI_NUMERICHOST flag. In the interest
of being conservative simply zero out everything.
2021-11-09 16:23:11 +01:00
Derick Rethans
904933e918 Fixed bug #81458: Regression: Incorrect difference after timezone change 2021-11-08 09:40:27 +00:00
Nikita Popov
a38f4f9881 Fix bug #78647
We can't take ownership of the delayed autoload table here. It is
important that pending classes get loaded before resolving variance
of any nested classed, as they might actually be lower in the
hierarchy.
2021-11-08 09:59:33 +01:00
Christoph M. Becker
7f2533d065
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #71316: libpng warning from imagecreatefromstring
2021-11-04 11:21:10 +01:00
Christoph M. Becker
f22f4afd84
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #71316: libpng warning from imagecreatefromstring
2021-11-04 11:19:24 +01:00
Christoph M. Becker
1919c4b44d
Fix #71316: libpng warning from imagecreatefromstring
We backport the respective upstream fix[1] to our bundled libgd.

[1] <636100b928>

Closes GH-7615.
2021-11-04 11:16:45 +01:00
Clément Chigot
cfe8a455a6 Fix bug #81507: Adjust XCOFF asm files for AIX assembler
AIX assembler is a bit more strict than GNU assembler. Thus, adjust
the XCOFF asm files to be able to accept both assembler.

This pulls in upstream boost context changes from
https://github.com/boostorg/context/pull/191.

Closes GH-7579.
2021-11-04 10:54:42 +01:00
Nikita Popov
4b9fbc6627 Fixed bug #81587
iterator_funcs_ptr may be null for Iterators with custom
get_iterator. Ideally MultipleIterator would make use of get_iterator,
but this would require a large implementation change.
2021-11-04 10:34:52 +01:00
George Peter Banyard
5a3774cac5
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix Bug #81588 TokyoCabinet driver leaks memory
2021-11-03 15:01:56 +00:00
George Peter Banyard
84524afb9e
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix Bug #81588 TokyoCabinet driver leaks memory
2021-11-03 15:01:41 +00:00