Changeset 2328 in subversion
- Timestamp:
- Mar 4, 2009 5:02:55 AM (4 years ago)
- Location:
- trunk/roundcubemail/tests
- Files:
-
- 2 edited
-
mailfunc.php (modified) (1 diff)
-
src/htmlbody.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/tests/mailfunc.php
r2324 r2328 56 56 $this->assertPattern('/Subscription form/', $html, "Include <form> contents"); 57 57 $this->assertPattern('/<!-- input not allowed -->/', $html, "No input elements allowed"); 58 $this->assertPattern('/<!-- link not allowed -->/', $html, "No external links allowed"); 58 59 $this->assertPattern('/<a[^>]+ target="_blank">/', $html, "Set target to _blank"); 59 60 $this->assertTrue($GLOBALS['REMOTE_OBJECTS'], "Remote object detected"); 60 61 61 62 // render HTML in safe mode 62 $html2 = rcmail_ print_body($part, array('safe' => true));63 $html2 = rcmail_html4inline(rcmail_print_body($part, array('safe' => true)), 'foo'); 63 64 64 65 $this->assertPattern('/<style [^>]+>/', $html2, "Allow styles in safe mode"); 65 66 $this->assertPattern('#src="http://evilsite.net/mailings/ex3.jpg"#', $html2, "Allow external images in HTML (safe mode)"); 66 67 $this->assertPattern("#url\('http://evilsite.net/newsletter/image/bg/bg-64.jpg'\)#", $html2, "Allow external images in CSS (safe mode)"); 68 69 $css = '<link rel="stylesheet" type="text/css" href="./bin/modcss.php?u='.urlencode('http://anysite.net/styles/mail.css').'&c=foo"'; 70 $this->assertPattern('#'.preg_quote($css).'#', $html2, "Filter external styleseehts with bin/modcss.php"); 67 71 } 68 72 -
trunk/roundcubemail/tests/src/htmlbody.txt
r2323 r2328 4 4 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> 5 5 <title>RoundCube Test Message</title> 6 <link rel="stylesheet" type="text/css" href="http://anysite.net/styles/mail.css"> 6 7 <style type="text/css"> 7 8
Note: See TracChangeset
for help on using the changeset viewer.
