1
0
mirror of https://github.com/php/php-src.git synced 2026-04-15 12:01:07 +02:00
Christoph M. Becker eb03290754 Fix #53891: iconv_mime_encode() fails to Q-encode UTF-8 string
The minimum length of an encoded-word is actually the pure encoding
overhead plus the length of the `output-charset` plus the minimum unit
of encoded text, which is 4 for B-encoding and (for simplicity) 3 for
Q-encoding.  We also cater to the possibility that we need further
encoded words, which would be split by the `line-break-chars` followed
by a space character.  Obviously, the former `out_charset_len + 12` is
too simplistic and wrong in the given case (where the magic number
would be 13).

These simplifications are somewhat wasteful, but iconv_mime_encode()
with Q-encoding is wasteful anyway (see bug 66828[1]), and the proper
solution to convert the whole input to the desired output charset
upfront, and applying the encoding afterwards appears too much a change
for the stable releases.

[1] <https://bugs.php.net/66828>
2018-08-25 14:30:07 +02:00
2018-07-31 16:38:35 +02:00
2018-08-16 06:55:14 +02:00
2018-08-25 11:58:17 +02:00
2017-09-11 09:23:01 +02:00
2018-08-23 21:27:43 +02:00
2018-05-26 22:05:06 +02:00
2018-08-25 11:58:17 +02:00
2018-07-12 13:47:11 +02:00
2018-07-25 00:53:25 +02:00
2018-01-06 21:12:12 +01:00
2018-06-25 08:31:32 +02:00
2018-08-03 07:49:29 +02:00
2018-07-25 00:53:25 +02:00
2018-06-25 08:31:32 +02:00
2009-11-23 21:54:21 +00:00
2018-07-29 10:53:21 +02:00
2017-11-10 05:34:13 +00:00
2018-02-08 17:52:51 +01:00
2008-01-17 14:37:58 +00:00
2018-06-25 08:31:32 +02:00
2018-06-02 18:58:46 +02:00
2018-07-06 09:55:47 +02:00
2018-02-08 17:18:26 +01:00
2018-07-14 19:33:35 -03:00
2018-07-27 16:27:41 +02:00
2018-08-05 23:12:29 +02:00
2016-08-11 08:08:26 +09:00

The PHP Interpreter

This is the github mirror of the official PHP repository located at https://git.php.net.

Build Status Build status

Pull Requests

PHP accepts pull requests via github. Discussions are done on github, but depending on the topic can also be relayed to the official PHP developer mailing list internals@lists.php.net.

New features require an RFC and must be accepted by the developers. See https://wiki.php.net/rfc and https://wiki.php.net/rfc/voting for more information on the process.

Bug fixes do not require an RFC, but require a bugtracker ticket. Always open a ticket at https://bugs.php.net and reference the bug id using #NNNNNN.

Fix #55371: get_magic_quotes_gpc() throws deprecation warning

After removing magic quotes, the get_magic_quotes_gpc function caused
a deprecate warning. get_magic_quotes_gpc can be used to detected
the magic_quotes behavior and therefore should not raise a warning at any
time. The patch removes this warning

We do not merge pull requests directly on github. All PRs will be pulled and pushed through https://git.php.net.

Guidelines for contributors

Description
⚠️ ARCHIVED: Original GitHub repository no longer exists. Preserved as backup on 2026-01-22T16:25:23.756Z
Readme BSD-3-Clause 1 GiB
Languages
C 66%
PHP 31.3%
C++ 0.8%
Shell 0.5%
M4 0.4%
Other 0.8%