1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00
Commit Graph

841 Commits

Author SHA1 Message Date
KsaR 01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
George Peter Banyard 27d40da95d Convert IMAPConnection to IMAP\Connection 2021-05-05 14:22:43 +01:00
Nikita Popov b74f5ee477 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix build warning
2021-04-27 10:11:20 +02:00
Nikita Popov 7544f66da9 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix build warning
2021-04-27 10:10:55 +02:00
Nikita Popov 310c0561a9 Fix build warning
This causes the build to fail on PHP-8.0 and higher.
2021-04-27 10:10:22 +02:00
Stanislav Malyshev 3d2c810eeb Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #80710: imap_mail_compose() header injection
2021-04-26 22:26:42 -07:00
Stanislav Malyshev a4d9ccbcd6 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80710: imap_mail_compose() header injection
2021-04-26 21:49:38 -07:00
Stanislav Malyshev 568df31698 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80710: imap_mail_compose() header injection
2021-04-26 21:48:16 -07:00
Christoph M. Becker 37962c61d2 Fix #80710: imap_mail_compose() header injection
Like `mail()` and `mb_send_mail()`, `imap_mail_compose()` must prevent
header injection.  For maximum backward compatibility, we still allow
header folding for general headers, and still accept trailing line
breaks for address lists.
2021-04-26 21:43:03 -07:00
George Peter Banyard 5caaf40b43 Introduce pseudo-keyword ZEND_FALLTHROUGH
And use it instead of comments
2021-04-07 00:46:29 +01:00
George Peter Banyard bfd3fda0f4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE
2021-02-27 13:14:23 +00:00
George Peter Banyard 1ee6aad248 Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE
This also affected imap_reopen().
Add a supplementary test that the CL_EXPUNGE flag does have
the intended effect.

Closes GH-6732
2021-02-27 13:12:22 +00:00
Máté Kocsis bf0f6aaf18 Improve class entry generation
Related to GH-6701
2021-02-16 13:09:56 +01:00
Nikita Popov b10416a652 Deprecate passing null to non-nullable arg of internal function
This deprecates passing null to non-nullable scale arguments of
internal functions, with the eventual goal of making the behavior
consistent with userland functions, where null is never accepted
for non-nullable arguments.

This change is expected to cause quite a lot of fallout. In most
cases, calling code should be adjusted to avoid passing null. In
some cases, PHP should be adjusted to make some function arguments
nullable. I have already fixed a number of functions before landing
this, but feel free to file a bug if you encounter a function that
doesn't accept null, but probably should. (The rule of thumb for
this to be applicable is that the function must have special behavior
for 0 or "", which is distinct from the natural behavior of the
parameter.)

RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

Closes GH-6475.
2021-02-11 21:46:13 +01:00
Máté Kocsis 99b08ac281 Implicitly enable function entry generation when class entry generation is enabled
Closes GH-6675
2021-02-09 13:37:24 +01:00
Máté Kocsis 98fb565c74 Generate class entries from stubs for another batch of extensions
Closes GH-6669
2021-02-08 19:53:55 +01:00
Nikita Popov 3e01f5afb1 Replace zend_bool uses with bool
We're starting to see a mix between uses of zend_bool and bool.
Replace all usages with the standard bool type everywhere.

Of course, zend_bool is retained as an alias.
2021-01-15 12:33:06 +01:00
Nikita Popov 422d1665a2 Make convert_to_*_ex simple aliases of convert_to_*
Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
since PHP 7.

The only difference that was still left is that _ex checked whether
the type is the same first, but the usage of these macros did not
actually distinguish on whether such an inlined check is valuable
or not in a given context.

Also drop the unused convert_to_explicit_type macros.
2021-01-14 12:11:11 +01:00
Christoph M. Becker b30462bead Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix imap stubs
2021-01-03 16:20:01 +01:00
Christoph M. Becker aab23282fc Fix imap stubs
Closes GH-6559.
2021-01-03 16:15:46 +01:00
George Peter Banyard 4935fbe90f Update hash for IMAP stubs after adding final qualifier 2020-12-23 21:56:31 +01:00
Ayesh Karunaratne af68d4aae6 IMAP: Declare IMAPConnection class as final (stub+test)
Updates the `IMAPConnection` class stub to make sure it has the `final` flag, and adds a test to verify it.
2020-12-23 21:21:32 +01:00
Ayesh Karunaratne 7f1659afcb IMAP: Disallow direct new IMAPConnection() construct
Disallows constructing an `IMAPConnection` class directly with `new IMAPConnection` construct, by throwing an `Error` exception if attempted.
`imap_open` is still the only way to create `IMAPConnection` objects.
2020-12-23 21:21:32 +01:00
George Peter Banyard c6a8f201b1 EXPECTF imap_errors() test's authentication error 2020-12-22 23:14:11 +01:00
George Peter Banyard 7606994356 Make imap_errors() test no hang
Instead of attempting to connect with an invalid password, connect as an anonymous user.
As this is disabled in our Dovecot configuration, this generates an error, and fails fast.
2020-12-22 19:55:30 +01:00
George Peter Banyard a80a029896 Optimize Dovecot configuration for IMAP tests
Closes GH-6531
2020-12-22 19:55:30 +01:00
George Peter Banyard 383779e502 Convert IMAP resource to object
Closes GH-6418
2020-12-22 03:06:35 +01:00
George Peter Banyard fec771db87 Merge branch 'PHP-8.0'
* PHP-8.0:
  Standardize behaviour for int message number between functions
  Add tests for passing a UID instead of a message number
2020-12-03 17:44:47 +00:00
George Peter Banyard 426fe2f20c Standardize behaviour for int message number between functions 2020-12-03 17:43:08 +00:00
George Peter Banyard e45cc31c41 Add tests for passing a UID instead of a message number 2020-12-03 16:38:22 +00:00
Sara Golemon 1071d85764 Flesh out HashTable insertion APIs
Fills out the array/object-property insert helpers for zend_array, zend_object, and zend_reference.

This adds the following matrix of 18 APIs
add_next_index_T()
add_index_T()
add_assoc_T()
add_assoc_T_ex()
add_property_T()
add_property_T_ex()

Where T in array, object, reference

Converted internal callsites currently doing an explicit object wrap.
2020-12-01 18:36:21 +00:00
George Peter Banyard 0811ccb44d Merge branch 'PHP-8.0'
* PHP-8.0:
  Backport IMAP test modernization to PHP-8.0 branch
2020-12-01 16:39:11 +00:00
George Peter Banyard 5aaffc8095 Backport IMAP test modernization to PHP-8.0 branch
Closes GH-6476
2020-12-01 16:38:08 +00:00
Dmitry Stogov 3030d4aa12 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed incorrect "skipif.inc" include
2020-12-01 11:34:36 +03:00
Dmitry Stogov 4959c60524 Fixed incorrect "skipif.inc" include 2020-12-01 11:34:09 +03:00
George Peter Banyard e42bf726c0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0
  Rename XmlParser to XMLParser for consistency with XMLWriter/XMLReader
2020-11-30 14:08:49 +00:00
George Peter Banyard 0076b47326 Fix Bug #80438: imap_msgno() incorrectly warns and return false on valid UIDs in PHP 8.0.0
Checking for a valid Unique ID (UID) cannot use the convenience macro as they might
be larger than the message number which has for maximum value the total number of
current messages available in the mailbox.
2020-11-30 14:08:31 +00:00
George Peter Banyard c4646371f1 Stabalize IMAP parallel testing, again
Drive by clean-up
Use less the default mailbox again
2020-11-06 14:26:47 +00:00
George Peter Banyard d17fae8a1c Fix parallel testing for IMAP
The script for the clean section was missing the $ Meta-character to only delete the default
mailbox when it's an exact match.

Reinstore parallel testing for more tests.
2020-11-04 12:40:12 +00:00
George Peter Banyard 28eb23cedb Make all IMAP fetch*() tests conflict with the default mailbox 2020-11-03 18:44:37 +00:00
George Peter Banyard 06ddda22fe Modernize IMAP tests
Use constants when appropriate, drop some ouputs which depends on env vars

Enable parallel testing.

Closes GH-6380
2020-11-03 09:50:42 +00:00
George Peter Banyard 77582ec13f Merge branch 'PHP-8.0'
* PHP-8.0:
  Throw Value/TypeError for invalid $bodies in imap_mail_compose()
2020-10-23 20:48:52 +01:00
George Peter Banyard 158d308197 Throw Value/TypeError for invalid $bodies in imap_mail_compose()
Small drive by refactoring to use HashTables

Closes GH-6371
2020-10-23 20:47:35 +01:00
George Peter Banyard 77d14477db Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix bug 76618
2020-10-22 17:06:07 +01:00
George Peter Banyard ba27866aec Fix bug 76618
Apply patch which was attached to the bug in July 2018
2020-10-22 17:05:29 +01:00
George Peter Banyard d5e2431884 Fix bug 76618
Apply patch which was attached to the bug in July 2018
2020-10-22 17:05:07 +01:00
George Peter Banyard 12a09183b3 Fix bug 76618
Apply patch which was attached to the bug in July 2018
2020-10-22 17:01:48 +01:00
George Peter Banyard 35f1b0bfaa Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix segfaults after conversion from zval to zend_string params
2020-10-22 15:50:42 +01:00
George Peter Banyard 8b265fb602 Fix segfaults after conversion from zval to zend_string params 2020-10-22 15:50:01 +01:00
Christoph M. Becker 9e9505669f Merge branch 'PHP-8.0' into master
* PHP-8.0:
  Fix #80242: imap_mail_compose() segfaults for multipart with rfc822
2020-10-20 19:02:32 +02:00