Skip to content

Commit

Permalink
bump mail gem to 2.7.0
Browse files Browse the repository at this point in the history
this bump includes a change to show line ending characters are treated
when processing mail. standard email line ending is \r\n and prior to
2.7.0, this was automatically converted back to \n when decoding
a message part. however, in some cases this could corrupt images, and so
that conversion is no longer happening. see:
mikel/mail#1113

this means that message replies that become discussion or conversation
replies will have the \r\n line ending in them.  we could restore the
previous behavior be manually calling `::Mail::Utilities.to_lf` in
incoming mail processor when we pull the decoded message parts, but
everything should work just fine with the different line ending.

closes COMMS-620

test plan:
- regression test incoming mail processing
- smoke test outgoing mail

Change-Id: I349c3e70b08ecb84ef92e597762c48708d52e800
Reviewed-on: https://gerrit.instructure.com/136259
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
  • Loading branch information
simonista committed Apr 17, 2018
1 parent f8390e8 commit db262fa
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 191 deletions.
3 changes: 2 additions & 1 deletion Gemfile.d/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
gem 'json-jwt', '1.7.2', require: false
gem 'twilio-ruby', '5.7.2', require: false

gem 'mail', '2.6.6', require: false
gem 'mail', '2.7.0', require: false
gem 'mini_mime', '1.0.0', require: false
gem 'marginalia', '1.5.0', require: false
gem 'mime-types', '1.25.1', require: 'mime/types'
gem 'mini_magick', '4.8.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "activesupport", ">= 3.2", "< 5.2"

spec.add_dependency "mail", "~> 2.6.4"
spec.add_dependency "mail", "~> 2.7.0"
spec.add_dependency "html_text_helper"
spec.add_dependency "utf8_cleaner"
spec.add_dependency "canvas_statsd"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div><img src="cid:B51265D5-31B4-443E-8DC9-585908F3CBCE" type="image/png"></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Zac Watson &lt;<a href="mailto:notifications@instructure.com">notifications@instructure.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> Zac Watson via Canvas Notifications &lt;<a href="mailto:notifications6+d1ade2a36efcc9ebec8c2ab65ee5252a142e75c0-40000080682905@instructure.com">notifications6+d1ade2a36efcc9ebec8c2ab65ee5252a142e75c0-40000080682905@instructure.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Monday, August 4, 2014 at 11:58 AM<br><span style="font-weight:bold">To: </span> &lt;<a href="mailto:zac+teacher@instructure.com">zac+teacher@instructure.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Zac Watson (Time And Relative Dimensions in Space) just sent you a message in Canvas.<br></div><div><br></div><div><div style="background-color: #FFFFFF;"><center>
<table cellpadding="8" cellspacing="0" style="margin: 0; padding: 0; width:728px;" border="0">
<tbody><tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" align="center" style="background-color: #ffffff;">
<tbody><tr>
<td>
<table cellpadding="0" cellspacing="0" style="" border="0" align="center">
<tbody><tr>
<td colspan="3" height="36"></td>
</tr>
<tr>
<td width="36"></td>
<td width="454" style="font-size: 14px; color: #444444; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; border-collapse: collapse;" align="left" valign="top">


<h4>
testing outlook deal
</h4><p>
what is up with outlook and their image tags?
</p>

<table border="0" style="border-collapse: collapse">
<tbody><tr height="30px">
<td></td>
</tr>
<tr>
<td align="left" width="50px"><img style="border-radius: 50px;" height="50px" width="50px" src="https://siteadmin.instructure.com/images/thumbnails/1902/nnpI6MSqL0RRNkH5HlzlAOtvzpNU3YjnymQPhmDN" alt="Zac" watson=""> </td> <td width="10"></td>
<td>
<table border="0" style="font-size: 14px; color: #444444; background-color: #ffffff; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';" valign="top" align="left">
<tbody><tr>
<td valign="bottom" align="left">
<b>Zac Watson</b>
</td>
</tr>
<tr>
<td valign="top" align="left">
<a href="https://doctorwho.instructure.com/conversations/2252129">
zac@instructure.com
</a>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>





</td>
<td width="36"></td>
</tr>
<tr>
<td colspan="3" height="36"></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" align="center" border="0" style="background-color: #ffffff;">
<tbody><tr>
<td height="60"></td>
</tr>
<tr>
<td align="center"> <img src="https://lh3.googleusercontent.com/D1pgZeJZrBFc_n_EnEWpj9BQpVUaQ6xj2FYl1ZaxhDN4c-x8X69DqfJ258Eb0u7sXyuvYI533FkaCouBv6131tpxMbd1CpjZDEMr2kN4t8_Epitm77c" alt="Canvas Logo"></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td style="padding: 0; border-collapse: collapse;">
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tbody><tr style="font-size: 11px; color: #a8b9c6; background-color: #ffffff; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';" valign="top">
<td width="375" align="right">
<a href="https://doctorwho.instructure.com/conversations/2252129">
View this message in Conversations
</a></td>
<td width="50" align="center"> | </td>
<td width="375" align="left"><a href="https://doctorwho.instructure.com/profile/communication">
Update your notification settings</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table></center></div></div></span></body></html>
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div><img src="cid:B51265D5-31B4-443E-8DC9-585908F3CBCE" type="image/png"></div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> Zac Watson &lt;<a href="mailto:notifications@instructure.com">notifications@instructure.com</a>&gt;<br><span style="font-weight:bold">Reply-To: </span> Zac Watson via Canvas Notifications &lt;<a href="mailto:notifications6+d1ade2a36efcc9ebec8c2ab65ee5252a142e75c0-40000080682905@instructure.com">notifications6+d1ade2a36efcc9ebec8c2ab65ee5252a142e75c0-40000080682905@instructure.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Monday, August 4, 2014 at 11:58 AM<br><span style="font-weight:bold">To: </span> &lt;<a href="mailto:zac+teacher@instructure.com">zac+teacher@instructure.com</a>&gt;<br><span style="font-weight:bold">Subject: </span> Zac Watson (Time And Relative Dimensions in Space) just sent you a message in Canvas.<br></div><div><br></div><div><div style="background-color: #FFFFFF;"><center>
<table cellpadding="8" cellspacing="0" style="margin: 0; padding: 0; width:728px;" border="0">
<tbody><tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" align="center" style="background-color: #ffffff;">
<tbody><tr>
<td>
<table cellpadding="0" cellspacing="0" style="" border="0" align="center">
<tbody><tr>
<td colspan="3" height="36"></td>
</tr>
<tr>
<td width="36"></td>
<td width="454" style="font-size: 14px; color: #444444; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif'; border-collapse: collapse;" align="left" valign="top">
<h4>
testing outlook deal
</h4><p>
what is up with outlook and their image tags?
</p>
<table border="0" style="border-collapse: collapse">
<tbody><tr height="30px">
<td></td>
</tr>
<tr>
<td align="left" width="50px"><img style="border-radius: 50px;" height="50px" width="50px" src="https://siteadmin.instructure.com/images/thumbnails/1902/nnpI6MSqL0RRNkH5HlzlAOtvzpNU3YjnymQPhmDN" alt="Zac" watson=""> </td> <td width="10"></td>
<td>
<table border="0" style="font-size: 14px; color: #444444; background-color: #ffffff; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';" valign="top" align="left">
<tbody><tr>
<td valign="bottom" align="left">
<b>Zac Watson</b>
</td>
</tr>
<tr>
<td valign="top" align="left">
<a href="https://doctorwho.instructure.com/conversations/2252129">
zac@instructure.com
</a>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
<td width="36"></td>
</tr>
<tr>
<td colspan="3" height="36"></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" align="center" border="0" style="background-color: #ffffff;">
<tbody><tr>
<td height="60"></td>
</tr>
<tr>
<td align="center"> <img src="https://lh3.googleusercontent.com/D1pgZeJZrBFc_n_EnEWpj9BQpVUaQ6xj2FYl1ZaxhDN4c-x8X69DqfJ258Eb0u7sXyuvYI533FkaCouBv6131tpxMbd1CpjZDEMr2kN4t8_Epitm77c" alt="Canvas Logo"></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td style="padding: 0; border-collapse: collapse;">
<table cellpadding="0" cellspacing="0" align="center" border="0">
<tbody><tr style="font-size: 11px; color: #a8b9c6; background-color: #ffffff; font-family: 'Open Sans', 'Lucida Grande', 'Segoe UI', Arial, Verdana, 'Lucida Sans Unicode', Tahoma, 'Sans Serif';" valign="top">
<td width="375" align="right">
<a href="https://doctorwho.instructure.com/conversations/2252129">
View this message in Conversations
</a></td>
<td width="50" align="center"> | </td>
<td width="375" align="left"><a href="https://doctorwho.instructure.com/profile/communication">
Update your notification settings</a></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></table></center></div></div></span></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ message in Canvas.<br/>
notification settings<br/>
&lt;<a href='https://doctorwho.instructure.com/profile/communication'>https://doctorwho.instructure.com/profile/communication</a>&gt;<br/>
<br/>
<br/>
<br/>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div dir="ltr">I am <strong>bolded</strong> text. I am an HTML part</div>

<a href="http://instructure.com">Instructure</a>
<div dir="ltr">I am <strong>bolded</strong> text. I am an HTML part</div>
<a href="http://instructure.com">Instructure</a>
Loading

0 comments on commit db262fa

Please sign in to comment.