summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
committeralecpl <alec@alec.pl>2011-03-31 12:32:44 +0000
commit382b8b1351e1a4598f04ab184cec803b96d7e4b7 (patch)
tree4a168a018618445f53afd5aa651fb655e68149d9
parent5228a5558f0ee9af785f1b4cdcef4d97b17b33f6 (diff)
- Applied fixes from trunk
-rw-r--r--CHANGELOG1
-rw-r--r--index.php2
-rw-r--r--program/include/rcmail.php12
-rw-r--r--program/include/rcube_browser.php2
-rw-r--r--program/localization/index.inc4
-rw-r--r--program/steps/utils/spell_googie.inc2
-rw-r--r--program/steps/utils/spell_html_googie.inc2
-rw-r--r--skins/default/images/abook_toolbar.pngbin13619 -> 13586 bytes
-rw-r--r--skins/default/images/buttons/bg.gifbin211 -> 197 bytes
-rw-r--r--skins/default/images/dbutton.pngbin374 -> 240 bytes
-rw-r--r--skins/default/images/dimple.pngbin239 -> 174 bytes
-rw-r--r--skins/default/images/display/icons.pngbin4300 -> 4246 bytes
-rw-r--r--skins/default/images/icons/expanded.pngbin169 -> 123 bytes
-rw-r--r--skins/default/images/icons/glass.pngbin535 -> 433 bytes
-rw-r--r--skins/default/images/icons/glass_roll.pngbin577 -> 544 bytes
-rw-r--r--skins/default/images/icons/groupactions.pngbin660 -> 495 bytes
-rw-r--r--skins/default/images/listheader.gifbin487 -> 470 bytes
-rw-r--r--skins/default/images/mail_footer.pngbin2235 -> 1027 bytes
-rw-r--r--skins/default/images/mail_toolbar.pngbin39305 -> 37571 bytes
-rw-r--r--skins/default/images/messageicons.pngbin3011 -> 2354 bytes
-rw-r--r--skins/default/images/pagenav.gifbin426 -> 357 bytes
-rw-r--r--skins/default/images/searchfield.gifbin397 -> 336 bytes
-rw-r--r--skins/default/images/tabs-left.gifbin461 -> 295 bytes
-rw-r--r--skins/default/images/tabs-right.gifbin2851 -> 837 bytes
-rw-r--r--skins/default/images/taskicons.gifbin2207 -> 1732 bytes
-rw-r--r--skins/default/images/taskicons.pngbin3813 -> 1732 bytes
-rw-r--r--skins/default/images/watermark.gifbin11081 -> 10237 bytes
27 files changed, 13 insertions, 12 deletions
diff --git a/CHANGELOG b/CHANGELOG
index fad555c8f..53892d21f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Stateless request tokens. No keep-alive necessary on login page (#1487829)
- PEAR::Net_SMTP 1.5.1
- Force names of unique constraints in PostgreSQL DDL
- Add code for prevention from IMAP connection hangs when server closes socket unexpectedly
diff --git a/index.php b/index.php
index cf3369376..c21cc5479 100644
--- a/index.php
+++ b/index.php
@@ -182,7 +182,7 @@ else {
// check client X-header to verify request origin
if ($OUTPUT->ajax_call) {
- if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token()) {
+ if (rc_request_header('X-Roundcube-Request') != $RCMAIL->get_request_token() && !$RCMAIL->config->get('devel_mode')) {
header('HTTP/1.1 404 Not Found');
die("Invalid Request");
}
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index e1dc22d07..8b4383e10 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -1105,12 +1105,9 @@ class rcmail
*/
public function get_request_token()
{
- $key = $this->task;
-
- if (!$_SESSION['request_tokens'][$key])
- $_SESSION['request_tokens'][$key] = md5(uniqid($key . mt_rand(), true));
-
- return $_SESSION['request_tokens'][$key];
+ $sess_id = $_COOKIE[ini_get('session.name')];
+ if (!$sess_id) $sess_id = session_id();
+ return md5('RT' . $this->task . $this->config->get('des_key') . $sess_id);
}
@@ -1123,7 +1120,8 @@ class rcmail
public function check_request($mode = RCUBE_INPUT_POST)
{
$token = get_input_value('_token', $mode);
- return !empty($token) && $_SESSION['request_tokens'][$this->task] == $token;
+ $sess_id = $_COOKIE[ini_get('session.name')];
+ return !empty($sess_id) && $token == $this->get_request_token();
}
diff --git a/program/include/rcube_browser.php b/program/include/rcube_browser.php
index d080c605d..d74ec708a 100644
--- a/program/include/rcube_browser.php
+++ b/program/include/rcube_browser.php
@@ -42,7 +42,7 @@ class rcube_browser
$this->ns4 = strstr($HTTP_USER_AGENT, 'mozilla/4') && !strstr($HTTP_USER_AGENT, 'msie');
$this->ns = ($this->ns4 || strstr($HTTP_USER_AGENT, 'netscape'));
$this->ie = !$this->opera && strstr($HTTP_USER_AGENT, 'compatible; msie');
- $this->mz = strstr($HTTP_USER_AGENT, 'mozilla/5');
+ $this->mz = !$this->ie && strstr($HTTP_USER_AGENT, 'mozilla/5');
$this->chrome = strstr($HTTP_USER_AGENT, 'chrome');
$this->khtml = strstr($HTTP_USER_AGENT, 'khtml');
$this->safari = !$this->chrome && ($this->khtml || strstr($HTTP_USER_AGENT, 'safari'));
diff --git a/program/localization/index.inc b/program/localization/index.inc
index 5f33792ca..9925a87a5 100644
--- a/program/localization/index.inc
+++ b/program/localization/index.inc
@@ -42,8 +42,8 @@ $rcube_languages = array(
'cs_CZ' => 'Czech (Česky)',
'da_DK' => 'Danish (Dansk)',
'fa_AF' => 'Dari (ﻯﺭﺩ)',
- 'de_DE' => 'Deutsch (Deutsch)',
- 'de_CH' => 'Deutsch (Schweiz)',
+ 'de_DE' => 'German (Deutsch)',
+ 'de_CH' => 'German (Schweiz)',
'nl_NL' => 'Dutch (Nederlands)',
'en_GB' => 'English (GB)',
'en_US' => 'English (US)',
diff --git a/program/steps/utils/spell_googie.inc b/program/steps/utils/spell_googie.inc
index 4c98dd697..269d792dd 100644
--- a/program/steps/utils/spell_googie.inc
+++ b/program/steps/utils/spell_googie.inc
@@ -41,6 +41,8 @@ if (!empty($CONFIG['spellcheck_uri']))
}
$data = file_get_contents('php://input');
+// Google has some problem with spaces, use \n instead
+$data = str_replace(' ', "\n", $data);
$store = "";
if ($fp = fsockopen($host, $port, $errno, $errstr, 30))
diff --git a/program/steps/utils/spell_html_googie.inc b/program/steps/utils/spell_html_googie.inc
index 1a4fbd48d..df18c036b 100644
--- a/program/steps/utils/spell_html_googie.inc
+++ b/program/steps/utils/spell_html_googie.inc
@@ -80,7 +80,7 @@ if (!empty($CONFIG['spellcheck_uri']))
$path = $a_uri['path'] . ($a_uri['query'] ? '?'.$a_uri['query'] : '') . $lang;
}
-$wordstr = implode(' ', (array) $data);
+$wordstr = implode("\n", (array) $data);
$data = '<?xml version="1.0" encoding="utf-8" ?>'
.'<spellrequest textalreadyclipped="0" ignoredups="0" ignoredigits="1" ignoreallcaps="1">'
.'<text>' . $wordstr . '</text>'
diff --git a/skins/default/images/abook_toolbar.png b/skins/default/images/abook_toolbar.png
index cb7ae051f..c761fbc9d 100644
--- a/skins/default/images/abook_toolbar.png
+++ b/skins/default/images/abook_toolbar.png
Binary files differ
diff --git a/skins/default/images/buttons/bg.gif b/skins/default/images/buttons/bg.gif
index e2191c910..be39f4a35 100644
--- a/skins/default/images/buttons/bg.gif
+++ b/skins/default/images/buttons/bg.gif
Binary files differ
diff --git a/skins/default/images/dbutton.png b/skins/default/images/dbutton.png
index 58a124594..7a85e3c5d 100644
--- a/skins/default/images/dbutton.png
+++ b/skins/default/images/dbutton.png
Binary files differ
diff --git a/skins/default/images/dimple.png b/skins/default/images/dimple.png
index d96a5aded..4de496c87 100644
--- a/skins/default/images/dimple.png
+++ b/skins/default/images/dimple.png
Binary files differ
diff --git a/skins/default/images/display/icons.png b/skins/default/images/display/icons.png
index 2ab7d43af..7bf4278bf 100644
--- a/skins/default/images/display/icons.png
+++ b/skins/default/images/display/icons.png
Binary files differ
diff --git a/skins/default/images/icons/expanded.png b/skins/default/images/icons/expanded.png
index 1db079b79..87e77a477 100644
--- a/skins/default/images/icons/expanded.png
+++ b/skins/default/images/icons/expanded.png
Binary files differ
diff --git a/skins/default/images/icons/glass.png b/skins/default/images/icons/glass.png
index 41dbb3a37..eb1b1dc74 100644
--- a/skins/default/images/icons/glass.png
+++ b/skins/default/images/icons/glass.png
Binary files differ
diff --git a/skins/default/images/icons/glass_roll.png b/skins/default/images/icons/glass_roll.png
index a6d975a5a..b11b59854 100644
--- a/skins/default/images/icons/glass_roll.png
+++ b/skins/default/images/icons/glass_roll.png
Binary files differ
diff --git a/skins/default/images/icons/groupactions.png b/skins/default/images/icons/groupactions.png
index 2e9c5f101..9e39bca2e 100644
--- a/skins/default/images/icons/groupactions.png
+++ b/skins/default/images/icons/groupactions.png
Binary files differ
diff --git a/skins/default/images/listheader.gif b/skins/default/images/listheader.gif
index 2f5c7f862..ff28d95ef 100644
--- a/skins/default/images/listheader.gif
+++ b/skins/default/images/listheader.gif
Binary files differ
diff --git a/skins/default/images/mail_footer.png b/skins/default/images/mail_footer.png
index e0f82b578..e2f24b28c 100644
--- a/skins/default/images/mail_footer.png
+++ b/skins/default/images/mail_footer.png
Binary files differ
diff --git a/skins/default/images/mail_toolbar.png b/skins/default/images/mail_toolbar.png
index 3ee0ce6d8..6ccc9bd9e 100644
--- a/skins/default/images/mail_toolbar.png
+++ b/skins/default/images/mail_toolbar.png
Binary files differ
diff --git a/skins/default/images/messageicons.png b/skins/default/images/messageicons.png
index 5afb4cbf8..3dd37606e 100644
--- a/skins/default/images/messageicons.png
+++ b/skins/default/images/messageicons.png
Binary files differ
diff --git a/skins/default/images/pagenav.gif b/skins/default/images/pagenav.gif
index 92a73a440..a4644a4e4 100644
--- a/skins/default/images/pagenav.gif
+++ b/skins/default/images/pagenav.gif
Binary files differ
diff --git a/skins/default/images/searchfield.gif b/skins/default/images/searchfield.gif
index 756a17e47..969f277b3 100644
--- a/skins/default/images/searchfield.gif
+++ b/skins/default/images/searchfield.gif
Binary files differ
diff --git a/skins/default/images/tabs-left.gif b/skins/default/images/tabs-left.gif
index 3465d1fd1..c1bf45aa8 100644
--- a/skins/default/images/tabs-left.gif
+++ b/skins/default/images/tabs-left.gif
Binary files differ
diff --git a/skins/default/images/tabs-right.gif b/skins/default/images/tabs-right.gif
index 252463c9a..9eba9a342 100644
--- a/skins/default/images/tabs-right.gif
+++ b/skins/default/images/tabs-right.gif
Binary files differ
diff --git a/skins/default/images/taskicons.gif b/skins/default/images/taskicons.gif
index 53376c3d2..feaa9a14e 100644
--- a/skins/default/images/taskicons.gif
+++ b/skins/default/images/taskicons.gif
Binary files differ
diff --git a/skins/default/images/taskicons.png b/skins/default/images/taskicons.png
index a6ee706c8..feaa9a14e 100644
--- a/skins/default/images/taskicons.png
+++ b/skins/default/images/taskicons.png
Binary files differ
diff --git a/skins/default/images/watermark.gif b/skins/default/images/watermark.gif
index 7581802ae..d235d0306 100644
--- a/skins/default/images/watermark.gif
+++ b/skins/default/images/watermark.gif
Binary files differ