<div dir="ltr"><div dir="auto"><div dir="auto"><span style="font-family:monospace,monospace">Em 30/03/2017 04:31, "Mathieu Parent" <<a href="mailto:math.parent@gmail.com" target="_blank">math.parent@gmail.com</a>> escreveu:<br></span></div><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="gmail-m_3033001655886400299quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace,monospace">2017-03-29 21:28 GMT+02:00 Leonardo Bruno <<a href="mailto:leobruno@gmail.com" target="_blank">leobruno@gmail.com</a>>:<br>
> Package: php-horde-imp<br>
> Version: 6.2.2-3<br>
> Severity: important<br>
><br>
> Scenario: Compose a message using the IMP smartmobile view in a Horde setup<br>
> with the 'attach_body_check' enabled.</span></blockquote><blockquote class="gmail-m_3033001655886400299quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace,monospace">
><br>
> Symptoms: When using the IMP smartmobile view, it will not be possible to<br>
> send a message without attachments if in the message body text there is any<br>
> of the keywords defined in the 'attach_body_check' IMP hook function.<br>
><br>
> The first attempt to send will show a warning message informing that no<br>
> attachments are indeed present, as it is expected. However, the following<br>
> attempts present the same behavior: a message warns about the absence of<br>
> attachments and the message is not sent. It will only be sent if: 1) you<br>
> remove the keyword(s) from the message, or 2) add some attachment, or 3)<br>
> disable the hook.<br>
><br>
> Remarks:<br>
> 1. Only the smartmobile view is affected.<br>
> 2. The tests where performed with the default Horde and IMP prefs. The only<br>
> hooke enabled is 'attach_body_check'.<br>
> 3. This issue affects the upcoming php-horde-imp stable package (version<br>
> 6.2.17-1) in Debian stretch.<br>
> 4. I chose to mark this report as 'important' as the smartmobile view<br>
> actually is a must-have feature, and there is no way to deactivate the<br>
> 'attach_body_check' only for this view.<br></span>
<span style="font-family:monospace,monospace"><br>
This is probably related to #749799.<br></span>
<span style="font-family:monospace,monospace"><br>
Help on this is appreciated.<br></span>
<span style="font-family:monospace,monospace"><br>
Regards<br></span>
<span style="font-family:monospace,monospace"><font color="#888888"><br>
<br>
--<br>
Mathieu<br>
</font></span></blockquote></div><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">Dear Mathieu,</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">This surely should be related to the jQuery issue.<br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">However, it may be helpful to inform that I updated the jQuery on the Horde setup I detected the problem with the 'attach_body_check'.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">I simply downloaded the jQuery version that is included with Horde code from the development team, and symlinked it in place of the version shipped with Debian.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">So I can confirm that the smartmobile view seems to work correctly, from the jQuery point of view. For my users and for me, the main features of Horde, IMP, Turba, Kronolith and Ingo work well on smart phones.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">Additionally, I did a little debugging and detected that, in some way, the 'IMP_Factory_Compose' class constructor is called as many times as the users clicks 'Send' button while composing messages on the smartmobile view.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">This behavior seems to be incorrect as that constructor is called just once in the Dynamic view which works correctly.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">I could also see that each time the 'IMP_Factory_Compose' construc</span><wbr><span style="font-family:monospace,monospace">tor is called, a new 'object' is generated with the _metadata['attach_body_check'] attribute not set. A different value for the _cacheid attribute is generated every time.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">This - I suppose - is causing the attach body verification code to always detect the currently being composed message as a 'new-still-no-verified' message, which is consistent white the endless loop behavior while trying to send the message.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">As the smartmobile view is primarily driven by jQuery, this can be related the the Horde JS code or to the library itself.</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">Regards,</span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace">Leonardo Bruno<br></span></div><div class="gmail_extra" dir="auto"><span style="font-family:monospace,monospace"><br></span></div></div>
</div>