summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-121-2/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Change parameters types from int to bool
| * | | Change parameters types from int to boolChristoph M. Becker2020-10-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are typical boolean parameters, so we shouldn't advertize them as integers. For the `$reverse` parameter that even fixes expectations, because the `reverse` member is a bitfield of 1 bit, so assigning any even integer would not set it. Closes GH-6328.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-121-9/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80216: imap_mail_compose() does not validate types/encodings
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-121-9/+18
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80216: imap_mail_compose() does not validate types/encodings
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-121-9/+18
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Fix #80216: imap_mail_compose() does not validate types/encodings
| | | * Fix #80216: imap_mail_compose() does not validate types/encodingsChristoph M. Becker2020-10-121-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to check whether the given `type`s and `encoding`s are within bounds to avoid segfaults and out-of-bound reads. Closes GH-6323.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-121-2/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-121-2/+4
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-121-2/+4
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
| | | * Fix #80223: imap_mail_compose() leaks envelope on malformed bodiesChristoph M. Becker2020-10-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | We have to clean up even on failure. Closes GH-6322.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-121-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80220: imap_mail_compose() may leak memory
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-121-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80220: imap_mail_compose() may leak memory
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-121-1/+1
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Fix #80220: imap_mail_compose() may leak memory
| | | * Fix #80220: imap_mail_compose() may leak memoryChristoph M. Becker2020-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless `topbod` is of `TYPEMULTIPART`, `mail_free_body()` does not free the `nested.part`; while we could do this ourselves, instead we just ignore additional bodies in this case, i.e. we don't attach them in the first place. Closes GH-6321.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-101-1/+8
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80215: imap_mail_compose() may modify by-val parameters
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-101-1/+8
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80215: imap_mail_compose() may modify by-val parameters
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-101-1/+8
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Fix #80215: imap_mail_compose() may modify by-val parameters
| | | * Fix #80215: imap_mail_compose() may modify by-val parametersChristoph M. Becker2020-10-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We separate the input arrays and all sub-arrays to avoid modification of the passed parameters. This should be rewritten to use `zend_string`s for the "master" branch. Closes GH-6316.
* | | | Merge branch 'PHP-8.0' into masterChristoph M. Becker2020-10-101-0/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80213: imap_mail_compose() segfaults on certain $bodies
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-101-0/+4
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80213: imap_mail_compose() segfaults on certain $bodies
| | * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-101-0/+4
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.3: Fix #80213: imap_mail_compose() segfaults on certain $bodies
| | | * Fix #80213: imap_mail_compose() segfaults on certain $bodiesChristoph M. Becker2020-10-101-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to cater to non-associative arrays where the key may be `NULL`; we just skip these elements. Closes GH-6315.
* | | | Fix [-Wlogical-op] in IMAPGeorge Peter Banyard2020-10-101-1/+1
|/ / /
* | | Fix potential mail related segfault on WindowsChristoph M. Becker2020-10-081-1/+1
| | | | | | | | | | | | | | | `rpath` may be `NULL` here, in which case we must not access its members.
* | | Promote warnings to Error in IMAP extensionGeorge Peter Banyard2020-09-231-172/+250
| | | | | | | | | | | | | | | | | | Drop some dependencies on argc at the same time Closes GH-6164
* | | Add proper default values for optional arguments in IMAPGeorge Peter Banyard2020-09-221-16/+12
| | | | | | | | | | | | Closes GH-6179
* | | Refactor imap_mail()'s internal implementation to use zend_stringsGeorge Peter Banyard2020-09-221-52/+55
| | |
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-211-1/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix memory leak in php_imap_mutf7()
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-211-1/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix memory leak in php_imap_mutf7()
| | * Fix memory leak in php_imap_mutf7()Christoph M. Becker2020-09-211-1/+2
| | | | | | | | | | | | We have to free the string which has been allocated by libc-client.
* | | Remove proto comments from C filesMax Semenik2020-07-061-178/+89
| | | | | | | | | | | | Closes GH-5758
* | | Fix [-Wundef] warning in IMAP extensionGeorge Peter Banyard2020-05-161-23/+23
| | |
* | | Generate functions entries from stubs for another set of extensionsMáté Kocsis2020-04-051-91/+1
| | | | | | | | | | | | Closes GH-5351
* | | Add stubs for aliasesMáté Kocsis2020-02-181-8/+8
| | | | | | | | | | | | Closes GH-5187
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-171-12/+12
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Use RETURN_THROWS() after zend_fetch_resource*()Máté Kocsis2020-01-031-47/+47
| | |
* | | Use RETURN_THROWS() after try_convert_to_string()Máté Kocsis2020-01-031-3/+3
| | |
* | | Use RETURN_THROWS() during ZPP in most of the extensionsMáté Kocsis2019-12-311-66/+66
| | | | | | | | | | | | Except for some bigger ones: reflection, sodium, spl
* | | Cleanup return values when parameter parsing is unsuccessfulMáté Kocsis2019-10-301-2/+2
| | |
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | | | | | | | | | Closes GH-4732.
* | | Added arginfo stubs for IMAP extensionStephen Reay2019-09-221-368/+2
| | |
* | | Convert IMAP function aliasesStephen Reay2019-09-191-4/+4
|/ / | | | | | | | | | | These are not really aliases, convert them to normal functions. Closes GH-4725.
* | Allow exceptions in __toString()Nikita Popov2019-06-051-3/+9
| | | | | | | | | | | | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* | Use release for regex in imapNikita Popov2019-04-101-2/+2
| | | | | | | | The regex may be used as a cache key now.
* | Accept zend_string* instead of char* in php_pcre_match_impl()Nikita Popov2019-03-181-1/+1
| |
* | Switch to use ZTS cacheDmitry Stogov2019-03-121-0/+6
| |
* | Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| |
* | Removed useless zval_ptr_dtor(return_value)Dmitry Stogov2018-12-261-2/+2
| |
* | Merge branch 'PHP-7.3'Stanislav Malyshev2018-12-031-1/+0
|\ \ | |/ | | | | | | | | | | * PHP-7.3: Fix bug #77143 - add more checks to buffer reads Fix bug #77143 - add more checks to buffer reads Fix #77020: null pointer dereference in imap_mail