# Patch for bug #34565

- Thread: https://externals.io/message/19106
- Original archive: https://news-web.php.net/php.internals/19106
- Started by Marco Tabini on 2005-09-20T22:00:46+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #19106 — Marco Tabini — 2005-09-20T22:00:46+00:00

URL: https://externals.io/message/19106#19106

[Resending with patch inline]

Hi--

Could someone with karma check that this patch is ok for bug #34565 and
commit it to CVS? The patch is against HEAD -- not sure if a separate commit
needs to be made against the 4.x and 5.x branches (and would appreciate some
pointers on this topic).

Cheers!


Marco





Index: ext/mbstring/mbstring.c
===================================================================
RCS file: /repository/php-src/ext/mbstring/mbstring.c,v
retrieving revision 1.224
diff -u -b -w -B -r1.224 mbstring.c
--- ext/mbstring/mbstring.c    3 Aug 2005 14:07:24 -0000    1.224
+++ ext/mbstring/mbstring.c    20 Sep 2005 21:51:25 -0000
@@ -3007,6 +3007,7 @@
     int subject_len;
     char *extra_cmd=NULL;
     int extra_cmd_len;
+        char *force_extra_parameters =
INI_STR("mail.force_extra_parameters");
     struct {
         int cnt_type:1;
         int cnt_trans_enc:1;
@@ -3208,6 +3209,12 @@
     mbfl_memory_device_output('\0', &device);
     headers = (char *)device.buffer;
 
+        if (force_extra_parameters) {
+                extra_cmd = estrdup(force_extra_parameters);
+        } else if (extra_cmd) {
+                extra_cmd = php_escape_shell_cmd(extra_cmd);
+        } 
+
     if (!err && php_mail(to, subject, message, headers, extra_cmd
TSRMLS_CC)) {
         RETVAL_TRUE;
     } else {

---

## #19109 — Ilia Alshanetsky — 2005-09-21T13:23:42+00:00

URL: https://externals.io/message/19106#19109 · In reply to: #19106

Patch applied, thanks.

Ilia
