Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 990dbf0cedc5e7df39833eaf1ef25821 > files > 8

squirrelmail-1.4.8-5.el5_7.13.src.rpm

Index: src/compose.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/compose.php,v
retrieving revision 1.319.2.70
diff -u -r1.319.2.70 compose.php
--- src/compose.php	3 Aug 2006 14:48:09 -0000	1.319.2.70
+++ src/compose.php	28 Nov 2006 14:50:34 -0000
@@ -96,6 +100,25 @@
 /** GET VARS */
 sqgetGlobalVar('attachedmessages', $attachedmessages, SQ_GET);
 
+/**
+ * Here we decode the data passed in from mailto.php.
+ */
+if ( sqgetGlobalVar('mailtodata', $mailtodata, SQ_GET) ) {
+    $trtable = array('to'       => 'send_to',
+                 'cc'           => 'send_to_cc',
+                 'bcc'          => 'send_to_bcc',
+                 'body'         => 'body',
+                 'subject'      => 'subject');
+    $mtdata = unserialize($mailtodata);
+    
+    foreach ($trtable as $f => $t) {
+        if ( !empty($mtdata[$f]) ) {
+            $$t = $mtdata[$f];
+        }
+    }
+    unset($mailtodata,$mtdata, $trtable);
+}
+
 /* Location (For HTTP 1.1 Header("Location: ...") redirects) */
 $location = get_location();
 
Index: src/login.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/login.php,v
retrieving revision 1.98.2.14
diff -u -r1.98.2.14 login.php
--- src/login.php	3 Aug 2006 14:48:09 -0000	1.98.2.14
+++ src/login.php	28 Nov 2006 14:50:34 -0000
@@ -113,10 +113,10 @@
 do_hook('login_top');
 
 
-if(sqgetGlobalVar('mailto', $mailto)) {
-    $rcptaddress = addHidden('mailto', $mailto);
+if(sqgetGlobalVar('mailtodata', $mailtodata)) {
+    $mailtofield = addHidden('mailtodata', $mailtodata);
 } else {
-    $rcptaddress = '';
+    $mailtofield = '';
 }
 
 /* If they don't have a logo, don't bother.. */
@@ -169,7 +169,7 @@
                                 html_tag( 'td',
 				    addPwField($password_form_name).
 				    addHidden('js_autodetect_results', SMPREF_JS_OFF).
-                    $rcptaddress . 
+                    $mailtofield . 
 				    addHidden('just_logged_in', '1'),
                                 'left', '', 'width="*"' )
                             ) ,
Index: src/mailto.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/mailto.php,v
retrieving revision 1.11.2.4
diff -u -r1.11.2.4 mailto.php
--- src/mailto.php	2 Jun 2006 15:51:50 -0000	1.11.2.4
+++ src/mailto.php	28 Nov 2006 14:50:34 -0000
@@ -41,6 +41,8 @@
                  'subject'      => 'subject');
 $url = '';
 
+$data = array();
+
 if(sqgetGlobalVar('emailaddress', $emailaddress)) {
     $emailaddress = trim($emailaddress);
     if(stristr($emailaddress, 'mailto:')) {
@@ -50,33 +52,32 @@
         list($emailaddress, $a) = explode('?', $emailaddress, 2);
         if(strlen(trim($a)) > 0) {
             $a = explode('=', $a, 2);
-            $url .= $trtable[strtolower($a[0])] . '=' . urlencode($a[1]) . '&';
+            $data[strtolower($a[0])] = $a[1];
         }
     }
-    $url = 'send_to=' . urlencode($emailaddress) . '&' . $url;
+    $data['to'] = $emailaddress;
 
     /* CC, BCC, etc could be any case, so we'll fix them here */
     foreach($_GET as $k=>$g) {
         $k = strtolower($k);
         if(isset($trtable[$k])) {
             $k = $trtable[$k];
-            $url .= $k . '=' . urlencode($g) . '&';
+            $data[$k] = $g;
         }
     }
-    $url = substr($url, 0, -1);
 }
 sqsession_is_active();
 
 if($force_login == false && sqsession_is_registered('user_is_logged_in')) {
     if($compose_only == true) {
-        $redirect = 'compose.php?' . $url;
+        $redirect = 'compose.php?mailtodata=' . urlencode(serialize($data));
     } else {
-        $redirect = 'webmail.php?right_frame=compose.php?' . urlencode($url);
+        $redirect = 'webmail.php?mailtodata=' . urlencode(serialize($data));
     }
 } else {
-    $redirect = 'login.php?mailto=' . urlencode($url);
+    $redirect = 'login.php?mailtodata=' . urlencode(serialize($data));
 }
 
 session_write_close();
 header('Location: ' . get_location() . '/' . $redirect);
-?>
\ No newline at end of file
+?>
Index: src/redirect.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/redirect.php,v
retrieving revision 1.72.2.13
diff -u -r1.72.2.13 redirect.php
--- src/redirect.php	3 Aug 2006 15:13:36 -0000	1.72.2.13
+++ src/redirect.php	28 Nov 2006 14:50:34 -0000
@@ -52,8 +52,8 @@
     $squirrelmail_language = $squirrelmail_default_language;
 }
 
-if (!sqgetGlobalVar('mailto', $mailto)) {
-    $mailto = '';
+if (!sqgetGlobalVar('mailtodata', $mailtodata)) {
+    $mailtodata = '';
 }
 
 
@@ -159,9 +159,9 @@
     unset($session_expired_location);
 }
 
-if($mailto != '') {
-    $redirect_url  = $location . '/webmail.php?right_frame=compose.php&mailto=';
-    $redirect_url .= urlencode($mailto);
+if($mailtodata != '') {
+    $redirect_url  = $location . '/webmail.php?right_frame=compose.php&mailtodata=';
+    $redirect_url .= urlencode($mailtodata);
 }
 
 
Index: src/webmail.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/src/webmail.php,v
retrieving revision 1.92.2.19
diff -u -r1.92.2.19 webmail.php
--- src/webmail.php	3 Aug 2006 14:48:09 -0000	1.92.2.19
+++ src/webmail.php	28 Nov 2006 14:50:34 -0000
@@ -52,11 +52,12 @@
     $mailbox = 'INBOX';
 }
 
-if(!sqgetGlobalVar('mailto', $mailto)) {
-    $mailto = '';
+if(sqgetGlobalVar('mailtodata', $mailtodata)) {
+    $mailtourl = 'mailtodata='.urlencode($mailtodata);
+} else {
+    $mailtourl = '';
 }
 
-
 is_logged_in();
 
 do_hook('webmail_top');
@@ -151,7 +152,7 @@
         $right_frame_url = 'folders.php';
         break;
     case 'compose.php':
-        $right_frame_url = 'compose.php?' . $mailto;
+        $right_frame_url = 'compose.php?' . $mailtourl;
         break;
     case '':
         $right_frame_url = 'right_main.php';