Remove development stuff and update versions

release-0.6
thomascube 13 years ago
parent a9d82447d0
commit af80aae480

File diff suppressed because it is too large Load Diff

@ -1,14 +1,6 @@
Roundcube Webmail (http://roundcube.net)
ATTENTION
---------
This is just a snapshot of the current SVN repository and is NOT A STABLE
version of Roundcube. It's not recommended to replace an existing installation
of Roundcube with this version. Also using a separate database for this
installation is highly recommended.
Introduction:
-------------
Roundcube Webmail is a browser-based multilingual IMAP client with an

@ -1,98 +0,0 @@
#!/usr/bin/env php
<?php
/*
+-----------------------------------------------------------------------+
| bin/dumpschema.sh |
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2009, The Roundcube Dev Team |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Dumps database schema in XML format using MDB2_Schema |
| |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
$Id$
*/
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require INSTALL_PATH.'program/include/clisetup.php';
/** callback function for schema dump **/
function print_schema($dump)
{
foreach ((array)$dump as $part)
echo $dump . "\n";
}
$config = new rcube_config();
// don't allow public access if not in devel_mode
if (!$config->get('devel_mode') && $_SERVER['REMOTE_ADDR']) {
header("HTTP/1.0 401 Access denied");
die("Access denied!");
}
$options = array(
'use_transactions' => false,
'log_line_break' => "\n",
'idxname_format' => '%s',
'debug' => false,
'quote_identifier' => true,
'force_defaults' => false,
'portability' => false,
);
$dsnw = $config->get('db_dsnw');
$dsn_array = MDB2::parseDSN($dsnw);
// set options for postgres databases
if ($dsn_array['phptype'] == 'pgsql') {
$options['disable_smart_seqname'] = true;
$options['seqname_format'] = '%s';
}
$schema =& MDB2_Schema::factory($dsnw, $options);
$schema->db->supported['transactions'] = false;
// send as text/xml when opened in browser
if ($_SERVER['REMOTE_ADDR'])
header('Content-Type: text/xml');
if (PEAR::isError($schema)) {
$error = $schema->getMessage() . ' ' . $schema->getUserInfo();
}
else {
$dump_config = array(
// 'output_mode' => 'file',
'output' => 'print_schema',
);
$definition = $schema->getDefinitionFromDatabase();
$definition['charset'] = 'utf8';
if (PEAR::isError($definition)) {
$error = $definition->getMessage() . ' ' . $definition->getUserInfo();
}
else {
$operation = $schema->dumpDatabase($definition, $dump_config, MDB2_SCHEMA_DUMP_STRUCTURE);
if (PEAR::isError($operation)) {
$error = $operation->getMessage() . ' ' . $operation->getUserInfo();
}
}
}
$schema->disconnect();
if ($error && !$_SERVER['REMOTE_ADDR'])
fputs(STDERR, $error);
?>

@ -1,25 +0,0 @@
#!/bin/sh
TITLE="Roundcube Classes"
PACKAGES="Core"
INSTALL_PATH="`dirname $0`/.."
PATH_PROJECT=$INSTALL_PATH/program/include
PATH_DOCS=$INSTALL_PATH/doc/phpdoc
BIN_PHPDOC="`/usr/bin/which phpdoc`"
if [ ! -x "$BIN_PHPDOC" ]
then
echo "phpdoc not found: $BIN_PHPDOC"
exit 1
fi
OUTPUTFORMAT=HTML
CONVERTER=frames
TEMPLATE=earthli
PRIVATE=off
# make documentation
$BIN_PHPDOC -d $PATH_PROJECT -t $PATH_DOCS -ti "$TITLE" -dn $PACKAGES \
-o $OUTPUTFORMAT:$CONVERTER:$TEMPLATE -pp $PRIVATE

@ -2,7 +2,7 @@
/*
+-------------------------------------------------------------------------+
| Roundcube Webmail IMAP Client |
| Version 0.6-svn |
| Version 0.6-beta |
| |
| Copyright (C) 2005-2011, The Roundcube Dev Team |
| |

@ -36,7 +36,7 @@ foreach ($crit_opts as $optname => $optval) {
}
// application constants
define('RCMAIL_VERSION', '0.6-svn');
define('RCMAIL_VERSION', '0.6-beta');
define('RCMAIL_CHARSET', 'UTF-8');
define('JS_OBJECT_NAME', 'rcmail');
define('RCMAIL_START', microtime(true));

@ -1,46 +0,0 @@
<?php
/**
* Test class to test html2text class
*
* @package Tests
*/
class rcube_test_html2text extends UnitTestCase
{
function __construct()
{
$this->UnitTestCase("HTML-to-Text conversion tests");
}
function test_html2text()
{
$data = array(
0 => array(
'title' => 'Test entry',
'in' => '',
'out' => '',
),
1 => array(
'title' => 'Basic HTML entities',
'in' => '&quot;&amp;',
'out' => '"&',
),
2 => array(
'title' => 'HTML entity string',
'in' => '&amp;quot;',
'out' => '&quot;',
),
);
$ht = new html2text(null, false, false);
foreach ($data as $item) {
$ht->set_html($item['in']);
$res = $ht->get_text();
$this->assertEqual($item['out'], $res, $item['title']);
}
}
}

@ -1,87 +0,0 @@
<?php
/**
* Test class to test messages decoding functions
*
* @package Tests
*/
class rcube_test_maildecode extends UnitTestCase
{
private $app;
function __construct()
{
$this->UnitTestCase('Mail headers decoding tests');
$this->app = rcmail::get_instance();
$this->app->imap_init(false);
}
/**
* Test decoding of single e-mail address strings
* Uses rcube_imap::decode_address_list()
*/
function test_decode_single_address()
{
$headers = array(
0 => 'test@domain.tld',
1 => '<test@domain.tld>',
2 => 'Test <test@domain.tld>',
3 => 'Test Test <test@domain.tld>',
4 => 'Test Test<test@domain.tld>',
5 => '"Test Test" <test@domain.tld>',
6 => '"Test Test"<test@domain.tld>',
7 => '"Test \\" Test" <test@domain.tld>',
8 => '"Test<Test" <test@domain.tld>',
9 => '=?ISO-8859-1?B?VGVzdAo=?= <test@domain.tld>',
10 => '=?ISO-8859-1?B?VGVzdAo=?=<test@domain.tld>', // #1487068
// comments in address (#1487673)
11 => 'Test (comment) <test@domain.tld>',
12 => '"Test" (comment) <test@domain.tld>',
13 => '"Test (comment)" (comment) <test@domain.tld>',
14 => '(comment) <test@domain.tld>',
15 => 'Test <test@(comment)domain.tld>',
16 => 'Test Test ((comment)) <test@domain.tld>',
17 => 'test@domain.tld (comment)',
18 => '"Test,Test" <test@domain.tld>',
// 1487939
19 => 'Test <"test test"@domain.tld>',
20 => '<"test test"@domain.tld>',
21 => '"test test"@domain.tld',
);
$results = array(
0 => array(1, '', 'test@domain.tld'),
1 => array(1, '', 'test@domain.tld'),
2 => array(1, 'Test', 'test@domain.tld'),
3 => array(1, 'Test Test', 'test@domain.tld'),
4 => array(1, 'Test Test', 'test@domain.tld'),
5 => array(1, 'Test Test', 'test@domain.tld'),
6 => array(1, 'Test Test', 'test@domain.tld'),
7 => array(1, 'Test " Test', 'test@domain.tld'),
8 => array(1, 'Test<Test', 'test@domain.tld'),
9 => array(1, 'Test', 'test@domain.tld'),
10 => array(1, 'Test', 'test@domain.tld'),
11 => array(1, 'Test', 'test@domain.tld'),
12 => array(1, 'Test', 'test@domain.tld'),
13 => array(1, 'Test (comment)', 'test@domain.tld'),
14 => array(1, '', 'test@domain.tld'),
15 => array(1, 'Test', 'test@domain.tld'),
16 => array(1, 'Test Test', 'test@domain.tld'),
17 => array(1, '', 'test@domain.tld'),
18 => array(1, 'Test,Test', 'test@domain.tld'),
19 => array(1, 'Test', '"test test"@domain.tld'),
20 => array(1, '', '"test test"@domain.tld'),
21 => array(1, '', '"test test"@domain.tld'),
);
foreach ($headers as $idx => $header) {
$res = $this->app->imap->decode_address_list($header);
$this->assertEqual($results[$idx][0], count($res), "Rows number in result for header: " . $header);
$this->assertEqual($results[$idx][1], $res[1]['name'], "Name part decoding for header: " . $header);
$this->assertEqual($results[$idx][2], $res[1]['mailto'], "Email part decoding for header: " . $header);
}
}
}

@ -1,160 +0,0 @@
<?php
/**
* Test class to test steps/mail/func.inc functions
*
* @package Tests
*/
class rcube_test_mailfunc extends UnitTestCase
{
function __construct()
{
$this->UnitTestCase('Mail body rendering tests');
// simulate environment to successfully include func.inc
$GLOBALS['RCMAIL'] = $RCMAIL = rcmail::get_instance();
$GLOBALS['OUTPUT'] = $OUTPUT = $RCMAIL->load_gui();
$RCMAIL->action = 'autocomplete';
$RCMAIL->imap_init(false);
$IMAP = $RCMAIL->imap;
require_once INSTALL_PATH . 'program/steps/mail/func.inc';
$GLOBALS['EMAIL_ADDRESS_PATTERN'] = $EMAIL_ADDRESS_PATTERN;
}
/**
* Helper method to create a HTML message part object
*/
function get_html_part($body)
{
$part = new rcube_message_part;
$part->ctype_primary = 'text';
$part->ctype_secondary = 'html';
$part->body = file_get_contents(TESTS_DIR . $body);
$part->replaces = array();
return $part;
}
/**
* Test sanitization of a "normal" html message
*/
function test_html()
{
$part = $this->get_html_part('src/htmlbody.txt');
$part->replaces = array('ex1.jpg' => 'part_1.2.jpg', 'ex2.jpg' => 'part_1.2.jpg');
// render HTML in normal mode
$html = rcmail_html4inline(rcmail_print_body($part, array('safe' => false)), 'foo');
$this->assertPattern('/src="'.$part->replaces['ex1.jpg'].'"/', $html, "Replace reference to inline image");
$this->assertPattern('#background="./program/blocked.gif"#', $html, "Replace external background image");
$this->assertNoPattern('/ex3.jpg/', $html, "No references to external images");
$this->assertNoPattern('/<meta [^>]+>/', $html, "No meta tags allowed");
//$this->assertNoPattern('/<style [^>]+>/', $html, "No style tags allowed");
$this->assertNoPattern('/<form [^>]+>/', $html, "No form tags allowed");
$this->assertPattern('/Subscription form/', $html, "Include <form> contents");
$this->assertPattern('/<!-- input ignored -->/', $html, "No input elements allowed");
$this->assertPattern('/<!-- link ignored -->/', $html, "No external links allowed");
$this->assertPattern('/<a[^>]+ target="_blank">/', $html, "Set target to _blank");
$this->assertTrue($GLOBALS['REMOTE_OBJECTS'], "Remote object detected");
// render HTML in safe mode
$html2 = rcmail_html4inline(rcmail_print_body($part, array('safe' => true)), 'foo');
$this->assertPattern('/<style [^>]+>/', $html2, "Allow styles in safe mode");
$this->assertPattern('#src="http://evilsite.net/mailings/ex3.jpg"#', $html2, "Allow external images in HTML (safe mode)");
$this->assertPattern("#url\('?http://evilsite.net/newsletter/image/bg/bg-64.jpg'?\)#", $html2, "Allow external images in CSS (safe mode)");
$css = '<link rel="stylesheet" .+_u=tmp-[a-z0-9]+\.css.+_action=modcss';
$this->assertPattern('#'.$css.'#Ui', $html2, "Filter (anonymized) external styleseehts with utils/modcss.inc");
}
/**
* Test the elimination of some trivial XSS vulnerabilities
*/
function test_html_xss()
{
$part = $this->get_html_part('src/htmlxss.txt');
$washed = rcmail_print_body($part, array('safe' => true));
$this->assertNoPattern('/src="skins/', $washed, "Remove local references");
$this->assertNoPattern('/\son[a-z]+/', $washed, "Remove on* attributes");
$html = rcmail_html4inline($washed, 'foo');
$this->assertNoPattern('/onclick="return rcmail.command(\'compose\',\'xss@somehost.net\',this)"/', $html, "Clean mailto links");
$this->assertNoPattern('/alert/', $html, "Remove alerts");
}
/**
* Test HTML sanitization to fix the CSS Expression Input Validation Vulnerability
* reported at http://www.securityfocus.com/bid/26800/
*/
function test_html_xss2()
{
$part = $this->get_html_part('src/BID-26800.txt');
$washed = rcmail_print_body($part, array('safe' => true));
$this->assertNoPattern('/alert|expression|javascript|xss/', $washed, "Remove evil style blocks");
$this->assertNoPattern('/font-style:italic/', $washed, "Allow valid styles");
}
/**
* Test links pattern replacements in plaintext messages
*/
function test_plaintext()
{
$part = new rcube_message_part;
$part->ctype_primary = 'text';
$part->ctype_secondary = 'plain';
$part->body = quoted_printable_decode(file_get_contents(TESTS_DIR . 'src/plainbody.txt'));
$html = rcmail_print_body($part, array('safe' => true));
$this->assertPattern('/<a href="mailto:nobody@roundcube.net" onclick="return rcmail.command\(\'compose\',\'nobody@roundcube.net\',this\)">nobody@roundcube.net<\/a>/', $html, "Mailto links with onclick");
$this->assertPattern('#<a href="http://www.apple.com/legal/privacy" target="_blank">http://www.apple.com/legal/privacy</a>#', $html, "Links with target=_blank");
$this->assertPattern('#\\[<a href="http://example.com/\\?tx\\[a\\]=5" target="_blank">http://example.com/\\?tx\\[a\\]=5</a>\\]#', $html, "Links with square brackets");
}
/**
* Test mailto links in html messages
*/
function test_mailto()
{
$part = $this->get_html_part('src/mailto.txt');
// render HTML in normal mode
$html = rcmail_html4inline(rcmail_print_body($part, array('safe' => false)), 'foo');
$mailto = '<a href="mailto:me@me.com?subject=this is the subject&amp;body=this is the body"'
.' onclick="return rcmail.command(\'compose\',\'me@me.com?subject=this is the subject&amp;body=this is the body\',this)">e-mail</a>';
$this->assertPattern('|'.preg_quote($mailto, '|').'|', $html, "Extended mailto links");
}
/**
* Test the elimination of HTML comments
*/
function test_html_comments()
{
$part = $this->get_html_part('src/htmlcom.txt');
$washed = rcmail_print_body($part, array('safe' => true));
// #1487759
$this->assertPattern('|<p>test1</p>|', $washed, "Buggy HTML comments");
// but conditional comments (<!--[if ...) should be removed
$this->assertNoPattern('|<p>test2</p>|', $washed, "Conditional HTML comments");
}
/**
* Test URI base resolving in HTML messages
*/
function test_resolve_base()
{
$html = file_get_contents(TESTS_DIR . 'src/htmlbase.txt');
$html = rcmail_resolve_base($html);
$this->assertPattern('|src="http://alec\.pl/dir/img1\.gif"|', $html, "URI base resolving [1]");
$this->assertPattern('|src="http://alec\.pl/dir/img2\.gif"|', $html, "URI base resolving [2]");
$this->assertPattern('|src="http://alec\.pl/img3\.gif"|', $html, "URI base resolving [3]");
}
}

@ -1,45 +0,0 @@
<?php
/**
* Test class to test rcmail_mod_css_styles and XSS vulnerabilites
*
* @package Tests
*/
class rcube_test_modcss extends UnitTestCase
{
function __construct()
{
$this->UnitTestCase('CSS modification and vulnerability tests');
}
function test_modcss()
{
$css = file_get_contents(TESTS_DIR . 'src/valid.css');
$mod = rcmail_mod_css_styles($css, 'rcmbody');
$this->assertPattern('/#rcmbody\s+\{/', $mod, "Replace body style definition");
$this->assertPattern('/#rcmbody h1\s\{/', $mod, "Prefix tag styles (single)");
$this->assertPattern('/#rcmbody h1, #rcmbody h2, #rcmbody h3, #rcmbody textarea\s+\{/', $mod, "Prefix tag styles (multiple)");
$this->assertPattern('/#rcmbody \.noscript\s+\{/', $mod, "Prefix class styles");
}
function test_xss()
{
$mod = rcmail_mod_css_styles("body.main2cols { background-image: url('../images/leftcol.png'); }", 'rcmbody');
$this->assertEqual("/* evil! */", $mod, "No url() values allowed");
$mod = rcmail_mod_css_styles("@import url('http://localhost/somestuff/css/master.css');", 'rcmbody');
$this->assertEqual("/* evil! */", $mod, "No import statements");
$mod = rcmail_mod_css_styles("left:expression(document.body.offsetWidth-20)", 'rcmbody');
$this->assertEqual("/* evil! */", $mod, "No expression properties");
$mod = rcmail_mod_css_styles("left:exp/* */ression( alert(&#039;xss3&#039;) )", 'rcmbody');
$this->assertEqual("/* evil! */", $mod, "Don't allow encoding quirks");
$mod = rcmail_mod_css_styles("background:\\0075\\0072\\006c( javascript:alert(&#039;xss&#039;) )", 'rcmbody');
$this->assertEqual("/* evil! */", $mod, "Don't allow encoding quirks (2)");
}
}

@ -1,54 +0,0 @@
#!/usr/bin/env php
<?php
/*
+-----------------------------------------------------------------------+
| tests/runtests.sh |
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2009, The Roundcube Dev Team |
| Licensed under the GNU GPL |
| |
| PURPOSE: |
| Run-script for unit tests based on http://simpletest.org |
| All .php files in this folder will be treated as tests |
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
$Id: $
*/
if (php_sapi_name() != 'cli')
die("Not in shell mode (php-cli)");
if (!defined('SIMPLETEST')) define('SIMPLETEST', '/www/simpletest/');
if (!defined('INSTALL_PATH')) define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
define('TESTS_DIR', dirname(__FILE__) . '/');
define('RCMAIL_CONFIG_DIR', TESTS_DIR . 'config');
require_once(SIMPLETEST . 'unit_tester.php');
require_once(SIMPLETEST . 'reporter.php');
require_once(INSTALL_PATH . 'program/include/iniset.php');
if (count($_SERVER['argv']) > 1) {
$testfiles = array();
for ($i=1; $i < count($_SERVER['argv']); $i++)
$testfiles[] = realpath('./' . $_SERVER['argv'][$i]);
}
else {
$testfiles = glob(TESTS_DIR . '*.php');
}
$test = new TestSuite('Roundcube unit tests');
$reporter = new TextReporter();
foreach ($testfiles as $fn) {
$test->addTestFile($fn);
}
$test->run($reporter);
?>

@ -1,52 +0,0 @@
<html>
<head>
</head>
<body>
<h1>1 test</h1>
<p>&lt;style&gt; block</p>
<style>input { left:expression( alert(&#039;expression!&#039;) ) }</style>
<style>div { background:url(alert(&#039;URL!&#039;) ) }</style>
<h1>2 test</h1>
<p>&lt;div&gt; block</p>
<div style="font-style:italic">valid css</div>
<div style="{ left:expression( alert(&#039;expression!&#039;) ) }">
<div style="{ background:url( alert(&#039;URL!&#039;) ) }">
<h1>3 test</h1>
<p>Inject comment text</p>
<div style="{ left:exp/* */ression( alert(&#039;xss3&#039;) ) }">
<div style="{ background:u/* */rl( alert(&#039;xssurl3&#039;) ) }">
<h1>4 test</h1>
<p>Using reverse solid to directe the codepoint</p>
<div style="{ left:\0065\0078pression( alert(&#039;xss4&#039;) ) }">
<div style="{ background:\0075rl( alert(&#039;xssurl4&#039;) ) }">
<h1>5 test</h1>
<p>Character entity references</p>
<p>Character entity references is acceptable in "inline styles"</p>
<div style="{ left:&#x0065;xpression( alert(&#039;xss&#039;) ) }">
<div style="{ left:&#101;xpression( alert(&#039;xss&#039;) ) }">
<div style="{ background:&#x0075;rl( alert(&#039;URL!&#039;) ) }">
<div style="{ background:&#117;rl( alert(&#039;URL!&#039;) ) }">
<div style="{ left:&#x0065xpression( alert(&#039;xss&#039;) ) }">
<div style="{ left:ï½.ï½.ï½<C3AF>ï½.ï½.ï½.ï½.ï½.ï½<C3AF>ï½.( alert(&#039;xss&#039;) ) }">
<div style="{ left:ï½.ï½.&#x2f;**/pression( alert(&#039;xss&#039;) ) }">
<div style="{ left:exp&#x0280;essio&#x0274;( alert(&#039;xss&#039;) ) }">
<div style="{ left:&#x5c;0065&#x5c;0078pression( alert(&#039;xss&#039;) ) }">
<div style="{ left:ex p ression( alert(&#039;xss&#039;) ) }">
<div style="{ background:ï½.ï½.ï½.( javascript:alert(&#039;xss&#039;) ) }">
<div style="{ background:&#x0075;/**/rl( javascript:alert(&#039;xss&#039;) ) }">
<div style="{ background:\0075\0072\006c( javascript:alert(&#039;xss&#039;) ) }">
<div style="{ background:u&#x0280;&#x029F;( javascript:alert(&#039;xss&#039;) )
}">
<div style="{ background:&#x5c;0075&#x5c;0280l( javascript:alert(&#039;xss&#039;)
) }">
<div style="{ background:u r l( javascript:alert(&#039;xss&#039;) ) }">
</body>
</html>

@ -1,49 +0,0 @@
BEGIN:VCARD
VERSION:3.0
N:;;;;
FN:Apple Computer AG
ORG:Apple Computer AG;
item1.ADR;type=WORK;type=pref:;;Birgistrasse 4a;Wallisellen-Zürich;;8304;Switzerland
item1.X-ABADR:ch
item2.URL;type=pref:http\://www.apple.ch
item2.X-ABLabel:_$!<HomePage>!$_
PHOTO;BASE64:
/9j/4AAQSkZJRgABAQAAAQABAAD/7QAcUGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAD/2wBDAAEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQH/wAARCAAwADADAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAA
AAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEI
I0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlq
c3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW
19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL
/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLR
ChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn
6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/igAoAKAPmH43ftT+CfgzqNt4bNjeeLvGV2IHXw7
pVxDbLZx3LBbdtU1GVLhbN7jIMFvHa3VzIpWRoY4mWQ9dDCTrrmuoQ/mavfvZXV7dW2jkr4ynQfL
Zzn1inZL1lZ6+ST87H0lp1zLe6fY3k9s1nNd2dtczWjv5j2ss8KSyWzybU3tA7mJn2JuKk7Vzgcr
Vm1e9m1fvrv8zqi+aKbVm0nbtdXt8i5SGFAHHeOfH3hH4b6DP4k8Z61a6JpUBCCW4LPNdTsCUtbK
1iD3F5dSYO2C3jd8AuwVFZhdOnOrLlhFyf4Lzb6IzqVYUo81SSiundvslu3/AEz5i0n9u74Fanqo
064m8UaNbvII49X1TRUGnnORvmFje3t5BGTjDtatwcyCPBrreArpX9xvqlJ3/FJP7zlWYUHKzVRL
+ZxVvnaTa+4+QLvVPgJ4U+LutfFXx78QJfi3q954iuvEOieHvBmkyzaVbO1x5ulPruq6pLawTvp1
uLdIrK08xFmgXzl2oI67LV50o0qdP2K5VGUptKXnyxi29XfVtb6HDehGtKpUm6zcnNKCfK9brnlK
3pZJ37pH3/8ACj9qb4T/ABd1FdD0TUr3SPETozwaJ4ht47C5vQgLONOnjnuLS8dVBYwJOt1tDMIN
oLV51XCVqK5pJSj1cW3b1uk1vvqvM9Kji6VZ8qbjJ7KVlf0abTf4n0dXMdQUAfhf+2J8UNW8ffFz
W9Cnlki0XwDqOp+GdNsFdhB9qsr6a31DUDHu2tcXbwojSEbhFCka4Uc+9hKUadGMl8VRKcn11V0v
RJng4urKpWkntTlKCXTRtN+re58n11HKFAH6PfsGfBvQfEl3rHxR8Q2y38vhrUrfT/DNpIT5FvqY
iF1carIgI8ye2R4Y7RXykbySTbS6xlfOx9aUVGlF2503N+W1vnrc9HAUYzlKrJX5GuVf3t7+dvu3
vc/WKvIPXCgD8FP2s/BF/wCC/jd4wlu0It/Fmp6h4usJf4JINZ1G7ndVbu0UpZZBztY446V9BhZq
dCnZ/DFQfrFJHz+Kg4V6l/tSc15qTb/rzPmqug5woA++v2J/j74d+HN9rHgLxndrpmjeJr62vtJ1
mbP2Sw1dY/s0ltfOM+Rb30Yh8u5ZTHFPEFlZEk3Dgx2HlVUZw1lBNOPVp9vNa6X22137sFiI0ZSh
N2jNpqXSLSe/k+/R+p+w1eMe0FAHxz+2P8DLr4r+CIPEPhy2Nx4y8FJdXVnaxrmfWdGlAk1DSosK
WkuozEt5p8fHmTLNADuuQR24KuqU3GTtCpbXtLo32T2b9GcWNw7qwU4q84X06yi9Wl531XfXyPxK
ME4nNsYZRciUwG3MbicTh/LMJix5glD/ACGPbv3/AC4zxXtniFvUNJ1XSmjXVNM1DTWmUvCuoWVz
ZtKgxloxcRxmRRkZZcgZGTzSTT2afo7hqtz6w/ZB+BV78UPHtl4n1eykHgfwdewajfXE0bCDVtVt
mE+n6PAzAJOBOkdxqAUssdsnlSDNwoPLi66pU3FP95NNJdk95P06d35XOvCUHWqJtfu4NOT7vdR8
7vfsvVH7gV4R7oUAFAHKReA/A8Gsy+IofBnhSHxBO7ST67F4d0iPWZnb7zy6mlmL2R2/iZ5yT3NX
7Spbl9pPl/l55W+69iPZUubm9nDmvfm5I81+97XuX9a8MeGvEtsLLxF4e0PX7MMGFprWk2Gq2wZe
jCC+t54tw7HZkdqUZzg7wlKL7xk4v700OUIT0lCMl2lFS/NMuaXpOlaHZQ6Zoumafo+nW4It9P0u
yttPsoATkiG1tI4oIgTyQkagnmk5Sk7ybk+7bb+96jjGMVaMVFdopJfcjQpDP//Z
X-ABShowAs:COMPANY
X-ABUID:2E4CB084-4767-4C85-BBCA-805B1DCB1C8E\:ABPerson
END:VCARD

@ -1,10 +0,0 @@
<html>
<head>
<base href="http://alec.pl/dir/" />
</head>
<body>
<img src="img1.gif" />
<img src="./img2.gif" />
<img src="../img3.gif" />
</body>
</html>

@ -1,51 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Roundcube Test Message</title>
<link rel="stylesheet" type="text/css" href="http://anysite.net/styles/mail.css">
<style type="text/css">
p, a {
font-family: Arial, 'Bitstream Vera Sans', Helvetica;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
</style>
</head>
<body style="margin: 0 0 0 0;">
<table width="100%" cellpadding="0" cellspacing="20" style="background-image:url(http://evilsite.net/newsletter/image/bg/bg-64.jpg);background-attachment:fixed;" background="http://evilsite.net/newsletter/image/bg/bg-64.jpg" border="0">
<tr>
<td>
<h1>This is a HTML message</h1>
<p>See nice pictures like the following:</p>
<div>
<img src="ex1.jpg" width="320" height="320" alt="Example 1">
<img src="ex2.jpg" width="320" height="320" alt="Example 2">
<img src="http://evilsite.net/mailings/ex3.jpg" width="320" height="320" alt="Example 3">
</div>
<form action="http://evilsite.net/subscribe.php">
<p>Subscription form</p>
E-Mail: <input type="text" name="mail" value=""><br/>
<input type="submit" value="Subscribe">
</form>
<p>To unsubscribe click here <a href="http://evilsite.net/unsubscribe.php?mail=foo@bar.com"> or
send a mail to <a href="mailto:unsubscribe@evilsite.net">unsubscribe@evilsite.net</a></p>
</td>
</tr>
</table>
</body>
</html>

@ -1,16 +0,0 @@
<html>
<head>
<title>Roundcube Test Message</title>
</head>
<body>
<!--REF>
<p>test1</p>
<!--DEREF>
<!--[if gte mso 9]><xml>
<p>test2</p>
</xml><![endif]-->
</body>
</html>

@ -1,22 +0,0 @@
<html>
<body>
<p><img onLoad.="alert(document.cookie)" src="skins/default/images/roundcube_logo.png" /></p>
<p><a href="mailto:xss@somehost.net') && alert(document.cookie) || ignore('">mail me!</a>
<a href="http://roundcube.net" target="_self">roundcube.net</a>
<a href="http://roundcube.net" \onmouseover="alert('XSS')">roundcube.net (2)</a>
</p>
<div>Brilliant!</div>
<table><tbody><tr><td background="javascript:alert('XSS')">BBBBBB</td></tr></tbody></table>
<p>
Have a nice Christmas time.<br />
Thomas
</p>
</body>
</html>

@ -1,11 +0,0 @@
BEGIN:VCARD
VERSION:2.1
N;CHARSET=windows-1252:Doë;John;;;
FN;CHARSET=windows-1252:John Doë
ORG:roundcube.net;
EMAIL;INTERNET;WORK:inbox@roundcube.net
EMAIL;INTERNET;HOME;TYPE=pref:roundcube@gmail.com
TEL;WORK:+123456789
ADR;WORK:;;The street;Hometown;;5555;Cayman Islands
NOTE:The notes...
END:VCARD

@ -1,8 +0,0 @@
<html>
<head></head>
<body>
<a href="mailto:me@me.com?subject=this is the subject&body=this is the body">e-mail</a>
</body>
</html>

@ -1,38 +0,0 @@
From: iPhone Developer Program <noreply-iphonedev@apple.com>
To: nobody@roundcube.net
*iPhone Developer Program*
-----------------------------------
iPhone SDK 2.2.1 is now available
https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=3D=
D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620&path=3D//i=
phone/login.action
Log in to the iPhone Dev Center to download iPhone SDK for iPhone OS 2.2.1.=
Installation of iPhone SDK 2.2.1 is required for development with devices =
updated to iPhone OS 2.2.1. Please view the Read Me before installing the n=
ew version of the iPhone SDK.
Log in now
https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=3D=
D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620&path=3D//i=
phone/login.action
-----------------------------------
Copyright (c) 2009 Apple Inc. 1 Infinite Loop, MS 303-3DM, Cupertino, CA 95=
014.
All Rights Reserved
http://www.apple.com/legal/default.html
Keep Informed
http://www.apple.com/enews/subscribe/
Privacy Policy
http://www.apple.com/legal/privacy.
My Info
https://myinfo.apple.com/cgi-bin/WebObjects/MyInfo
-[http://example.com/?tx[a]=5]-

@ -1,8 +0,0 @@
BEGIN:VCARD
VERSION:2.1
N;ENCODING=QUOTED-PRINTABLE:Iksi=F1ski;Piotr
FN;ENCODING=QUOTED-PRINTABLE:Piotr Iksi=F1ski
EMAIL;PREF;INTERNET:piotr.iksinski@somedomain.com
X-GENDER:Male
REV:20080716T203548Z
END:VCARD

Binary file not shown.

@ -1,30 +0,0 @@
/** Master style definitions **/
body, p, div, h1, h2, h3, textarea {
font-family: "Lucida Grande", Helvetica, sans-serif;
font-size: 8.8pt;
color: #333;
}
body {
background-color: white;
margin: 0;
}
h1 {
color: #1F519A;
font-size: 1.7em;
font-weight: normal;
margin-top: 0;
margin-bottom: 1em;
}
.noscript {
display: none;
}
.hint, .username {
color: #999;
}

@ -1,65 +0,0 @@
<?php
/**
* Unit tests for class rcube_vcard
*
* @package Tests
*/
class rcube_test_vcards extends UnitTestCase
{
function __construct()
{
$this->UnitTestCase('Vcard encoding/decoding tests');
}
function _srcpath($fn)
{
return realpath(dirname(__FILE__) . '/src/' . $fn);
}
function test_parse_one()
{
$vcard = new rcube_vcard(file_get_contents($this->_srcpath('apple.vcf')));
$this->assertEqual(true, $vcard->business, "Identify as business record");
$this->assertEqual("Apple Computer AG", $vcard->displayname, "FN => displayname");
$this->assertEqual("", $vcard->firstname, "No person name set");
}
function test_parse_two()
{
$vcard = new rcube_vcard(file_get_contents($this->_srcpath('johndoe.vcf')), null);
$this->assertEqual(false, $vcard->business, "Identify as private record");
$this->assertEqual("John Doë", $vcard->displayname, "Decode according to charset attribute");
$this->assertEqual("roundcube.net", $vcard->organization, "Test organization field");
$this->assertEqual(2, count($vcard->email), "List two e-mail addresses");
$this->assertEqual("roundcube@gmail.com", $vcard->email[0], "Use PREF e-mail as primary");
}
function test_import()
{
$input = file_get_contents($this->_srcpath('apple.vcf'));
$input .= file_get_contents($this->_srcpath('johndoe.vcf'));
$vcards = rcube_vcard::import($input);
$this->assertEqual(2, count($vcards), "Detected 2 vcards");
$this->assertEqual("Apple Computer AG", $vcards[0]->displayname, "FN => displayname");
$this->assertEqual("John Doë", $vcards[1]->displayname, "Displayname with correct charset");
// http://trac.roundcube.net/ticket/1485542
$vcards2 = rcube_vcard::import(file_get_contents($this->_srcpath('thebat.vcf')));
$this->assertEqual("Iksiñski", $vcards2[0]->surname, "Detect charset in encoded values");
}
function test_encodings()
{
$input = file_get_contents($this->_srcpath('utf-16_sample.vcf'));
$vcards = rcube_vcard::import($input);
$this->assertEqual("Ǽgean ĽdaMonté", $vcards[0]->displayname, "Decoded from UTF-16");
}
}
Loading…
Cancel
Save