]> git.donarmstrong.com Git - roundcube.git/blob - debian/patches/disable-dns-prefetch.patch
Imported Debian patch 0.5.2+dfsg-1
[roundcube.git] / debian / patches / disable-dns-prefetch.patch
1 Disable DNS prefetching to solve CVE-2010-0464.
2
3 Index: b/program/include/rcube_html_page.php
4 ===================================================================
5 --- a/program/include/rcube_html_page.php       2009-06-22 18:20:34.000000000 +0200
6 +++ b/program/include/rcube_html_page.php       2010-07-17 17:33:25.000000000 +0200
7 @@ -165,6 +165,13 @@
8              $__page_header.= $this->charset . '" />'."\n";
9          }
10  
11 +        // add hint to disable DNS prefetching
12 +        if (!headers_sent()) {
13 +            header('X-DNS-Prefetch-Control: off');
14 +        } else {
15 +            $__page_header.= '<meta http-equiv="x-dns-prefetch-control" content="off" />'."\n";
16 +        }
17 +
18          // definition of the code to be placed in the document header and footer
19          if (is_array($this->script_files['head'])) {
20              foreach ($this->script_files['head'] as $file) {