Postie - Version 1.7.29

Version Description

(future) = * fixed email header parsing bug in PHP7

Download this release

Release Info

Developer WayneAllen
Plugin Icon 128x128 Postie
Version 1.7.29
Comparing to
See all releases

Code changes from version 1.7.28 to 1.7.29

docs/Changes.txt CHANGED
@@ -27,6 +27,9 @@ All script, style and body tags are stripped from html emails.
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
 
 
 
30
  = 1.7.28 (2016-02-09) =
31
  * better tag detection with html
32
  * Don't skip image processing when Include Featured Image in Post is set to "No" and the Preferred Text Type is HTML.
27
  Attachments are now processed in the order they were attached.
28
 
29
  == CHANGELOG ==
30
+ = 1.7.29 (future) =
31
+ * fixed email header parsing bug in PHP7
32
+
33
  = 1.7.28 (2016-02-09) =
34
  * better tag detection with html
35
  * Don't skip image processing when Include Featured Image in Post is set to "No" and the Preferred Text Type is HTML.
docs/Postie.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
- Tested up to: 4.4.1
9
- Stable tag: 1.7.28
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
+ Tested up to: 4.4.2
9
+ Stable tag: 1.7.29
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
docs/TODO.txt CHANGED
@@ -1,5 +1,8 @@
1
  AddOn Ideas
2
  CSS Inliner - use one of the online services to convert class styled html to inline styles. https://www.google.com/search?q=css+inline+tool&oq=css+inline+tool
 
 
 
3
 
4
  Other
5
  allow other roles access to manual check like "Roles That Can Post"
@@ -16,9 +19,6 @@ Option to not process forwarded emails (getPostAuthorDetails)
16
  Add Message-ID header value to custom field (postie_message_id?) to both posts and comments.
17
  Use In-Reply-To header value as a better way to detect replies
18
  Verify that {TITLE} is doing the right thing.
19
- Automatic updates for AddOns:
20
- https://github.com/seedprod/sellwp-updater
21
- http://code.tutsplus.com/series/create-a-license-controlled-theme-and-plugin-update-system--cms-760
22
  automatically create category if it doesn't exist. new option to allow this feature?
23
  Comment not being created when subject contains category command []. I.e. listserv subject lines
24
  date: tag is being detected in body when not wanted
1
  AddOn Ideas
2
  CSS Inliner - use one of the online services to convert class styled html to inline styles. https://www.google.com/search?q=css+inline+tool&oq=css+inline+tool
3
+ Automatic updates for AddOns:
4
+ https://github.com/seedprod/sellwp-updater
5
+ http://code.tutsplus.com/series/create-a-license-controlled-theme-and-plugin-update-system--cms-760
6
 
7
  Other
8
  allow other roles access to manual check like "Roles That Can Post"
19
  Add Message-ID header value to custom field (postie_message_id?) to both posts and comments.
20
  Use In-Reply-To header value as a better way to detect replies
21
  Verify that {TITLE} is doing the right thing.
 
 
 
22
  automatically create category if it doesn't exist. new option to allow this feature?
23
  Comment not being created when subject contains category command []. I.e. listserv subject lines
24
  date: tag is being detected in body when not wanted
mimedecode.php CHANGED
@@ -59,7 +59,6 @@
59
  * @link http://pear.php.net/package/Mail_mime
60
  */
61
 
62
-
63
  /**
64
  * The Mail_mimeDecode class is used to decode mail/mime messages
65
  *
@@ -250,7 +249,6 @@ class Mail_mimeDecode {
250
  }
251
  }
252
 
253
-
254
  foreach ($headers as $key => $value) {
255
  $headers[$key]['name'] = strtolower($headers[$key]['name']);
256
  switch ($headers[$key]['name']) {
@@ -440,8 +438,9 @@ class Mail_mimeDecode {
440
  foreach ($headers as $value) {
441
  $hdr_name = substr($value, 0, $pos = strpos($value, ':'));
442
  $hdr_value = substr($value, $pos + 1);
443
- if ($hdr_value[0] == ' ')
444
  $hdr_value = substr($hdr_value, 1);
 
445
 
446
  $return[] = array(
447
  'name' => $hdr_name,
@@ -702,8 +701,9 @@ class Mail_mimeDecode {
702
  # source: http://www.phpkode.com/source/p/atmail/atmailopen/libs/Atmail/MIME_Words.php
703
 
704
  function _decode_Q($str) {
705
- $str = str_replace('_', "\x20", $str); # RFC-1522, Q rule 2
706
- $str = preg_replace('/=([\da-fA-F]{2})/e', "pack('C', hexdec('$1'))", $str); # RFC-1522, Q rule 1
 
707
  return $str;
708
  }
709
 
59
  * @link http://pear.php.net/package/Mail_mime
60
  */
61
 
 
62
  /**
63
  * The Mail_mimeDecode class is used to decode mail/mime messages
64
  *
249
  }
250
  }
251
 
 
252
  foreach ($headers as $key => $value) {
253
  $headers[$key]['name'] = strtolower($headers[$key]['name']);
254
  switch ($headers[$key]['name']) {
438
  foreach ($headers as $value) {
439
  $hdr_name = substr($value, 0, $pos = strpos($value, ':'));
440
  $hdr_value = substr($value, $pos + 1);
441
+ if ($hdr_value[0] == ' ') {
442
  $hdr_value = substr($hdr_value, 1);
443
+ }
444
 
445
  $return[] = array(
446
  'name' => $hdr_name,
701
  # source: http://www.phpkode.com/source/p/atmail/atmailopen/libs/Atmail/MIME_Words.php
702
 
703
  function _decode_Q($str) {
704
+ //$str = str_replace('_', "\x20", $str); # RFC-1522, Q rule 2
705
+ //$str = preg_replace('/=([\da-fA-F]{2})/e', "pack('C', hexdec('$1'))", $str); # RFC-1522, Q rule 1
706
+ $str = quoted_printable_decode(str_replace("_", " ", $str));
707
  return $str;
708
  }
709
 
postie-functions.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /*
3
- $Id: postie-functions.php 1346872 2016-02-09 17:05:09Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
@@ -2514,6 +2514,7 @@ function GetSubject(&$mimeDecodedEmail, &$content, $config) {
2514
  //assign the default title/subject
2515
  if (!array_key_exists('subject', $mimeDecodedEmail->headers) || empty($mimeDecodedEmail->headers['subject'])) {
2516
  DebugEcho("No subject in email");
 
2517
  if ($allow_subject_in_mail) {
2518
  list($subject, $content) = tag_Subject($content, $default_title);
2519
  } else {
1
  <?php
2
  /*
3
+ $Id: postie-functions.php 1351213 2016-02-15 20:12:06Z WayneAllen $
4
  */
5
 
6
  class PostiePostModifiers {
2514
  //assign the default title/subject
2515
  if (!array_key_exists('subject', $mimeDecodedEmail->headers) || empty($mimeDecodedEmail->headers['subject'])) {
2516
  DebugEcho("No subject in email");
2517
+ DebugDump($mimeDecodedEmail->headers);
2518
  if ($allow_subject_in_mail) {
2519
  list($subject, $content) = tag_Subject($content, $default_title);
2520
  } else {
postie.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
7
- Version: 1.7.28
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
@@ -28,12 +28,12 @@
28
  */
29
 
30
  /*
31
- $Id: postie.php 1346907 2016-02-09 18:02:38Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib_autolink.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
35
 
36
- define('POSTIE_VERSION', '1.7.28');
37
  define("POSTIE_ROOT", dirname(__FILE__));
38
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
39
 
4
  Plugin Name: Postie
5
  Plugin URI: http://PostiePlugin.com/
6
  Description: Create posts via email. Signifigantly upgrades the Post by Email features of Word Press.
7
+ Version: 1.7.29
8
  Author: Wayne Allen
9
  Author URI: http://PostiePlugin.com/
10
  License: GPL2
28
  */
29
 
30
  /*
31
+ $Id: postie.php 1351217 2016-02-15 20:14:33Z WayneAllen $
32
  */
33
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "lib_autolink.php");
34
  require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");
35
 
36
+ define('POSTIE_VERSION', '1.7.29');
37
  define("POSTIE_ROOT", dirname(__FILE__));
38
  define("POSTIE_URL", WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)));
39
 
readme.txt CHANGED
@@ -5,8 +5,8 @@ Author URI: http://allens-home.com/
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
- Tested up to: 4.4.1
9
- Stable tag: 1.7.28
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -235,6 +235,9 @@ All script, style and body tags are stripped from html emails.
235
  Attachments are now processed in the order they were attached.
236
 
237
  == CHANGELOG ==
 
 
 
238
  = 1.7.28 (2016-02-09) =
239
  * better tag detection with html
240
  * Don't skip image processing when Include Featured Image in Post is set to "No" and the Preferred Text Type is HTML.
5
  Plugin URI: http://PostiePlugin.com/
6
  Tags: e-mail, email, post-by-email
7
  Requires at least: 3.3.0
8
+ Tested up to: 4.4.2
9
+ Stable tag: 1.7.29
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
235
  Attachments are now processed in the order they were attached.
236
 
237
  == CHANGELOG ==
238
+ = 1.7.29 (future) =
239
+ * fixed email header parsing bug in PHP7
240
+
241
  = 1.7.28 (2016-02-09) =
242
  * better tag detection with html
243
  * Don't skip image processing when Include Featured Image in Post is set to "No" and the Preferred Text Type is HTML.