6.0.0-beta1
7/6/25

[#8581] View HTML attach do not render anything
Summary View HTML attach do not render anything
Queue IMP
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester rui.carneiro (at) portugalmail (dot) net
Created 09/16/2009 (5772 days ago)
Due
Updated 10/09/2009 (5749 days ago)
Assigned 09/16/2009 (5772 days ago)
Resolved 10/09/2009 (5749 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/09/2009 08:03:40 AM Jan Schneider State ⇒ Not A Bug
 
09/25/2009 04:24:31 PM Jan Schneider Comment #7 Reply to this comment
The reason is that we match [^>] to find the end of the bad string, 
because this is the only safe match (end of tag). We can't match [^'"] 
because the offending attribute might not be closed with a quote.
09/23/2009 09:51:33 AM rui (dot) carneiro (at) portugalmail (dot) net Comment #6
New Attachment: xss101.html Download
Reply to this comment
Please provide a reproducible test case, such as something that can
easily be dropped into the tests/ directory of the Horde_Text_Filter
package.
Here it is.
09/23/2009 03:31:03 AM Michael Slusarz Comment #5 Reply to this comment
Please provide a reproducible test case, such as something that can 
easily be dropped into the tests/ directory of the Horde_Text_Filter 
package.  I don't understand what your example is supposed to show.   
The preg in the previous comment is nowhere near the same as the preg 
contained in Xss.php.
09/22/2009 02:10:20 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #4 Reply to this comment
The regex in case is a complex version of this one: 
'/(=|url\()("?)[^>]*script:/'



With this simplified version I tried 3 different tests and the results 
are quite inconsistent.



1- onclick='javascript:console.log("test");' - Works fine.

2- style="background: url('javascript:test()');" - Works fine.

3- Test 1 and 2 on the same element - Does not work.



NOTE: this bug occurs on previous versions of IMP too.
09/16/2009 05:28:17 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #3 Reply to this comment
I don't see this.  And I don't know what regex you are referring to.
Sorry about that. Here it is:Horde/Text/Filter/Xss.php line:95


09/16/2009 04:51:12 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
I don't see this.  And I don't know what regex you are referring to.
09/16/2009 04:41:32 PM rui (dot) carneiro (at) portugalmail (dot) net Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ View HTML attach do not render anything
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
The "view.php?actionID=view_attach" link is not render anything when 
the attach is a HTML file.



The problem might be on the regex that remove 
"attribute="javascript:foo()". When this is preg is commented all work 
fine.

Saved Queries