1
0
mirror of https://github.com/php/php-src.git synced 2026-04-08 00:22:52 +02:00
Commit Graph

884 Commits

Author SHA1 Message Date
Ilija Tovilo
50f58c8923 Add ASAN XLEAK support
Only disable LSAN instead of skipping the test. This way we can still detect
memory issues which is arguably more important anyway.

Closes GH-10996
2023-04-03 08:02:19 +02:00
George Peter Banyard
dfae7f9835 Merge branch 'PHP-8.2'
* PHP-8.2:
  ext/imap/config.m4: -Werror=implicit-function-declaration compatibility.
2023-03-28 15:20:03 +01:00
George Peter Banyard
0ff059c553 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ext/imap/config.m4: -Werror=implicit-function-declaration compatibility.
2023-03-28 15:19:43 +01:00
Michael Orlitzky
f9cbeaa033 ext/imap/config.m4: -Werror=implicit-function-declaration compatibility.
The recent clang-16 throws errors for implicitly defined functions by
default. In many ./configure tests, an undefined function (which is
"implicitly defined" when you try to call it) is undefined because it
really does not exist. But in one case, utf8_to_mutf7() is undefined
because we forgot to include the header that defines it.

This commit updates the test for utf8_to_mutf7:

  * We now include the header (c-client.h) that defines it.
  * A "checking... yes/no" message was added to the test.
  * The test was switched from PHP_IMAP_TEST_BUILD to AC_COMPILE_IFELSE.
    This was the easiest way to avoid a return-type mismatch that runs
    afoul of -Werror=implicit-int.
  * CPPFLAGS is temporarily amended with the -I flag needed to find
    c-client.h.

Fixes GH-10947.

Closes GH-10948

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-03-28 15:18:18 +01:00
Ilija Tovilo
9d5f2f1343 Use new ZSTR_INIT_LITERAL macro (#10879) 2023-03-20 16:19:05 +01:00
Ilija Tovilo
d98963a071 Switch to Ubuntu 22.04 for GitHub actions jobs
Closes GH-10814
2023-03-10 00:17:23 +01:00
Máté Kocsis
7936c8085e Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385) 2023-01-23 10:52:14 +01:00
George Peter Banyard
4a365132e7 Merge branch 'PHP-8.2'
* PHP-8.2:
  Add a new imap_is_open() function to check that a connection object is still valid
2022-12-13 23:48:48 +00:00
George Peter Banyard
52a891aeaa Add a new imap_is_open() function to check that a connection object is still valid 2022-12-13 23:48:03 +00:00
Christoph M. Becker
e4ef394c6b Drop superfluous check for imap_stream
`GET_IMAP_STREAM` already checks whether `.imap_stream` is `NULL`, and
bails out in that case.

Closes GH-10053.
2022-12-06 11:01:18 +01:00
Máté Kocsis
e733ebf30e Add parenthesis around preprocessor conditions in stubs
gen_stub.php concatenates nested #ifs into one #if so let's make sure the semantics remain the same.
2022-09-02 16:21:28 +02:00
Máté Kocsis
b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Christoph M. Becker
e885831670 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-9309: Segfault when connection is used after imap_close()
2022-08-12 16:25:46 +02:00
Christoph M. Becker
71c22efae7 Fix GH-9309: Segfault when connection is used after imap_close()
We actually need to check whether `php_imap_object.imap_stream` is
`NULL` to detect that the connection has already been closed.

Closes GH-9313.
2022-08-12 16:24:30 +02:00
Máté Kocsis
e328c68305 Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
Eric Norris
09237f6126 Update request startup error messages 2022-07-18 23:19:59 +01:00
Remi Collet
55a88f36b6 add SensitiveParameter as known string and use it in arginfo 2022-07-18 11:43:33 +02:00
Tim Düsterhus
342e18f105 Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Pierrick Charron
6fd2b39397 Indent with TAB in .h files generated by gen_stub 2022-06-13 08:55:54 -04:00
Tim Düsterhus
176a484df2 Mark parameter in ext/imap as sensitive 2022-06-13 11:09:12 +02:00
Máté Kocsis
e7d482d896 Declare ext/imap constants in stubs (#8715) 2022-06-06 13:08:32 +02:00
Christoph M. Becker
d2bb59cc66 Test standard mail and imap on Windows CI
We setup the currently latest version of hMailServer[1] as mail server,
and configure according to imap_include.inc.  To not require further
configuration, we adapt mail_skipif.inc and mail_include.inc to match
that configuration.  However, we also change the default domain to the
reserved `example.com`.

We also update the standard mail tests to use the `--EXTENSIONS--`
section (instead of skipping the tests if ext/imap is not available).

Finally, we fix bug80751.phpt to expect the configured To and Cc mail
addresses.

[1] <https://www.hmailserver.com/>

Closes GH-8357.
2022-05-12 14:58:22 +02:00
Christoph M. Becker
80f18665e4 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix #81649: imap_(un)delete accept sequences, not single numbers
2021-11-25 18:31:29 +01:00
Christoph M. Becker
df5e95b4d1 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81649: imap_(un)delete accept sequences, not single numbers
2021-11-25 18:31:14 +01:00
Christoph M. Becker
179030d167 Fix #81649: imap_(un)delete accept sequences, not single numbers
As such, the parameter name `$message_num` is utmost misleading; it
should be `$message_nums` as for other functions.

Closes GH-7686.
2021-11-25 18:29:43 +01:00
Dmitry Stogov
90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
Nikita Popov
2a4dba7b14 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix maybe-uninitialized warning
2021-08-17 12:27:39 +02:00
Nikita Popov
b66168e86b Fix maybe-uninitialized warning
Some GCC versions don't like zend_try in loop. Avoid the issue
by pulling it out of the loop, we don't particularly care about
skipping further warnings if a bailout occurs, just that it
does not interrupt shutdown.

Closes GH-7380.
2021-08-17 12:27:32 +02:00
Nikita Popov
f603934a5e Merge branch 'PHP-8.0'
* PHP-8.0:
  Prevent bailout during imap shutdown error reporting
2021-08-17 10:35:16 +02:00
Nikita Popov
85eafc31e8 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Prevent bailout during imap shutdown error reporting
2021-08-17 10:35:07 +02:00
Nikita Popov
bcc2f0705d Prevent bailout during imap shutdown error reporting
This is a non-intrusive, minimal fix for bug #81316, which prevents
a bailout during imap RSHUTDOWN and prevents the basic shutdown
handler from being skipped.

I wasn't able to make the issue reproduce in a small test.
2021-08-17 10:33:39 +02:00
Kamil Tekiela
cd0cd3d31e Fix typos (#7327) 2021-08-01 18:03:30 +01:00
Máté Kocsis
663536d7d9 Improve class inheritance error messages (#7307) 2021-07-27 09:42:37 +02:00
Máté Kocsis
2378f35787 Use single line phpdoc in stubs where possible 2021-07-20 13:16:56 +02:00
Joe Watkins
570d9b63e9 Not serializable flag permeation 2021-07-20 12:28:35 +02:00
Máté Kocsis
b382883696 Indent stubs inside global namespace blocks (#7261) 2021-07-20 10:23:58 +02:00
Nikita Popov
2bc23cc6e3 Deprecate imap NIL constant
Part of https://wiki.php.net/rfc/deprecations_php_8_1.
2021-07-08 16:48:16 +02:00
Patrick Allaert
ceb6fa6dc0 Convert some recently introduced zend_bool to bool
As well as `scripts/dev/check_parameters.php` utility.

Cfr. 3e01f5afb1
2021-06-18 15:21:39 +01:00
Nikita Popov
b5a14e6c04 Port skipif.inc files to EXTENSIONS 2021-06-11 16:27:50 +02:00
Nikita Popov
39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00
Nikita Popov
7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00
Nikita Popov
bc8aa7d0e0 Use free_obj in IMAP\Connection
Looks like this incorrect pattern was copied from the FTP
implementation.
2021-06-09 12:14:41 +02:00
George Peter Banyard
b6958bb847 Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)
RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-05-31 15:48:45 +01:00
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