From 92cb7f56f38564d62c79a6c67b8b99248a3baa74 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 31 Oct 2012 04:35:57 -0400
Subject: [PATCH] Fix possible HTTP DoS on error in keep-alive requests (#1488782)

---
 CHANGELOG         |    1 +
 program/js/app.js |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index ff33fd9..4164c17 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix possible HTTP DoS on error in keep-alive requests (#1488782)
 - Add option to disable saving sent mail in Sent folder - no_save_sent_messages (#1488686)
 - Fix handling dont_override with message_sort_col and message_sort_order settings (#1488760)
 - Fix HTML part detection in messages with attachments (#1488769)
diff --git a/program/js/app.js b/program/js/app.js
index 1aa0082..c151a10 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6273,9 +6273,9 @@
 
     // re-send keep-alive requests after 30 seconds
     if (action == 'keep-alive')
-      setTimeout(function(){ ref.keep_alive(); }, 30000);
+      setTimeout(function(){ ref.keep_alive(); ref.start_keepalive(); }, 30000);
     else if (action == 'check-recent')
-      setTimeout(function(){ ref.check_for_recent(false); }, 30000);
+      setTimeout(function(){ ref.check_for_recent(false); ref.start_keepalive(); }, 30000);
   };
 
   // post the given form to a hidden iframe

--
Gitblit v1.9.1