Reduced default time security tokens stay valid from 30 days to 2 days (reduces chanc...
[squirrelmail.git] / functions / attachment_common.php
index 5cb395e46e2b8d15a9123f1f92188b840ea7ce30..ab339b72bce115e041c6795f94d9646b9e2ee5b4 100644 (file)
@@ -5,7 +5,7 @@
  *
  * This file provides the handling of often-used attachment types.
  *
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2010 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -223,7 +223,7 @@ function attachment_common_link_image(&$Args) {
     
     $attachment_common_show_images_list[] = $info;
 
-    $Args[0]['attachment_common']['href'] = $base_uri  . 'src/image.php?'. htmlspecialchars($QUERY_STRING);
+    $Args[0]['attachment_common']['href'] = $base_uri  . 'src/image.php?'. $QUERY_STRING;
     $Args[0]['attachment_common']['href'] =
           set_url_var($Args[0]['attachment_common']['href'],
           'ent_id',$Args[4]);
@@ -242,7 +242,7 @@ function attachment_common_link_vcard(&$Args) {
     global $base_uri;
     sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
 
-    $Args[0]['attachment_common']['href'] = $base_uri  . 'src/vcard.php?'. htmlspecialchars($QUERY_STRING);
+    $Args[0]['attachment_common']['href'] = $base_uri  . 'src/vcard.php?'. $QUERY_STRING;
     $Args[0]['attachment_common']['href'] =
           set_url_var($Args[0]['attachment_common']['href'],
           'ent_id',$Args[4]);
@@ -269,11 +269,10 @@ function attachment_common_octet_stream(&$Args) {
 
     $Ext = '';
     if (is_array($Regs) && isset($Regs[1])) {
-       $Ext = $Regs[1];
+        $Ext = $Regs[1];
+        $Ext = strtolower($Regs[1]);
     }
 
-    $Ext = strtolower($Regs[1]);
-
     if ($Ext == '' || ! isset($FileExtensionToMimeType[$Ext]))
         return;