Summary | Incomplete parsing of Href link |
Queue | IMP |
Queue Version | 4.3.3 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | dom.lalot (at) gmail (dot) com |
Created | 03/09/2009 (5963 days ago) |
Due | |
Updated | 06/30/2010 (5485 days ago) |
Assigned | 06/07/2010 (5508 days ago) |
Resolved | 06/30/2010 (5485 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Bug: 8062Merge from git: 178f8f7
http://cvs.horde.org/diff.php/imp/lib/MIME/Viewer/html.php?rt=horde&r1=1.75.2.40&r2=1.75.2.41&ty=u
Bug #8062: Fix parsing links to appear in new windowMake tests re: link to new window work again (this test now requires a
working Horde installation, but that is fine for me).
http://git.horde.org/diff.php/imp/lib/Mime/Viewer/Html.php?rt=horde-git&r1=3293e133b0e77c8615a6f867653f02d980f4bd77&r2=178f8f7494f18758603b27872845a2642a5c2296
http://git.horde.org/diff.php/imp/lib/tests/mime_viewer_html.phpt?rt=horde-git&r1=125d67abb65a72398662ad99c163a0b9f7496ff3&r2=178f8f7494f18758603b27872845a2642a5c2296
State ⇒ Assigned
spaces inside the <a> and <area> tags before the href or target
attributes. See the failing PEAR unit tests.
Bug #8062: Fix link parsingWe need to make sure there is a space before target/href or else params
contained in a URL can confuse the regexp if named target or href.
http://git.horde.org/diff.php/imp/lib/Mime/Viewer/Html.php?rt=horde-git&r1=7dc3f0b944c0bebc4d64f09f749ebf6929f998fc&r2=07d1333648750a0173727939655e4543727c37c3
the current version (IIRC, the diff is taken before the id is updated
to the current version).
http://cvs.horde.org/diff.php/imp/lib/MIME/Viewer/html.php?rt=horde&r1=1.75.2.38&r2=1.75.2.39&ty=u
Is there a version mismatch?
If I look at the diff:
- * $Horde: imp/lib/MIME/Viewer/html.php,v 1.75.2.37 2008/09/24
17:21:42 jan Exp $
+ * $Horde: imp/lib/MIME/Viewer/html.php,v 1.75.2.38 2009/01/06
15:24:09 jan Exp $
I'm already at 1.75.2.38 and the patch is to go to 1.75.2.39
Is there something broken?
So, I can't apply the patch!
Dom
http://cvs.horde.org/diff.php/imp/lib/MIME/Viewer/html.php?rt=horde&r1=1.75.2.38&r2=1.75.2.39&ty=u
State ⇒ Resolved
Assigned to Michael Slusarz
disk space issues on bugs@). This has been fixed in IMP 4.3.4 and
git. This was the fix:
Author: Michael M Slusarz <slusarz@curecanti.org>
AuthorDate: Tue Mar 10 16:30:47 2009 -0600
Commit: Michael M Slusarz <slusarz@curecanti.org>
CommitDate: Tue Mar 10 16:30:47 2009 -0600
Bug #8062: Fix link parsingWe need to make sure there is a space before target/href or else params
contained in a URL can confuse the regexp if named target or href.
---
imp/lib/Mime/Viewer/Html.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/imp/lib/Mime/Viewer/Html.php b/imp/lib/Mime/Viewer/Html.php
index 69000c6..bb0801d 100644
--- a/imp/lib/Mime/Viewer/Html.php
+++ b/imp/lib/Mime/Viewer/Html.php
@@ -170,11 +170,11 @@ class IMP_Horde_Mime_Viewer_Html extends
Horde_Mime_Viewe~
* mailto: links, links that have an "#xyz" anchor and ignore
* all links that already have a target. */
$data = preg_replace(
- array('/<a\s([^>]*\s*href=["\']?(#|mailto:))/i',
- '/<a\s([^>]*)\s*target=["\']?[^>"\'\s]*["\']?/i',
+ array('/<a\s([^>]*\s+href=["\']?(#|mailto:))/i',
+ '/<a\s([^>]*)\s+target=["\']?[^>"\'\s]*["\']?/i',
'/<a\s/i',
- '/<area\s([^>]*\s*href=["\']?(#|mailto:))/i',
- '/<area\s([^>]*)\s*target=["\']?[^>"\'\s]*["\']?/i',
+ '/<area\s([^>]*\s+href=["\']?(#|mailto:))/i',
+ '/<area\s([^>]*)\s+target=["\']?[^>"\'\s]*["\']?/i',
'/<area\s/i',
"/\x01/",
"/\x02/"),
New Attachment: Invitation album photo.eml
identity in the elm attached file.
State ⇒ Feedback
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Incomplete parsing of Href link
Type ⇒ Bug
Priority ⇒ 1. Low
Using picasaweb from google, the sent mail appears OK, but the link is
not fully parsed. It stops just at target=, ignoring the rest of the
link.
Dom
--00163630f4a1e3f3350464a2fe99
Content-Type: multipart/alternative; boundary=00163630f4a1e3f3320464a2fe98
--00163630f4a1e3f3320464a2fe98
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes
Content-Transfer-Encoding: base64
Q2VzIHBob3RvcyBvbnQg6XTpIGVudm956WVzIGF2ZWMgUGljYXNhLCB1biBsb2dpY2llbCBkZSBH
b29nbGUuDQpQb3VyIGwnZXNzYXllciwgcmVuZGV6LXZvdXMgc3VyIDogaHR0cDovL3BpY2FzYS5n
b29nbGUuY29tLy4NCg0KaHR0cDovL3BpY2FzYXdlYi5nb29nbGUuZnIvbGgvc3JlZGlyP3VuYW1l
PWVyaWMubGFsb3QmdGFyZ2V0PUFMQlVNJmlkPTUzMTA5NDAxNTg5MzI3ODUwMjUmYXV0aGtleT1H
djFzUmdDUGlLdjdqY3JyeU0tQUUmYXV0aGtleT1HdjFzUmdDUGlLdjdqY3JyeU0tQUUmaW52aXRl
PUNQM0JyY1lNJmZlYXQ9ZW1haWwNCg==
--00163630f4a1e3f3320464a2fe98
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
<body style=3D"font-family: Arial, Helvetica, sans-serif; background-color:=
white">
<!--a75c305b1c0a6022--><table border=3D0 cellpadding=3D0
cellspacing=3D0 width=3D"600px">
<tr>
<td bgcolor=3D"#E1ECFF" width=3D"10px"></td>
<td width=3D"*" style=3D"border: 1px solid #ccc; padding: .6em .8em;">
<div style=3D"padding-bottom: .6em; font-weight: bold; font-size: 12pt; col=
or:
#333;">Vous =EAtes invit=E9 =E0 voir l'album photo de Eric intitul=E9 :=<a href=3D'http://picasaweb.google.fr/lh/sredir?uname=3Deric.xxxxx&target=
=3DALBUM&id=3D5310940158932785025&authkey=3DGv1sRgCPiKv7jcrryM-AE&authkey=
=3DGv1sRgCPiKv7jcrryM-AE&invite=3DCP3BrcYM&feat=3Demail'>03-WaitakereRando<=
/a></div>
<div style=3D"background-color: #F5F5F5; border: 1px solid #CCC; padding: 0=
.8em;">
<!--a75c305b1c0a6022--><table cellspacing=3D0 cellpadding=3D0>
<tr>
<td valign=3D"top">
<div style=3D"border: 1px solid #ccc; padding: 7px; background-color: #FFF;=
">