phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: email/inc class.bopreferences.inc.php,1.10.2.2,1


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: email/inc class.bopreferences.inc.php,1.10.2.2,1.10.2.3 class.mail_msg_base.inc.php,1.61.2.5,1.61.2.6
Date: Tue, 23 Apr 2002 10:30:55 -0400

Update of /cvsroot/phpgroupware/email/inc
In directory subversions:/tmp/cvs-serv7616/email/inc

Modified Files:
      Tag: Version-0_9_14-branch
        class.bopreferences.inc.php class.mail_msg_base.inc.php 
Log Message:
This should clear up any confsion of emial passwords being encrypted to a 
session or to the system.

Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.bopreferences.inc.php,v
retrieving revision 1.10.2.2
retrieving revision 1.10.2.3
diff -C2 -r1.10.2.2 -r1.10.2.3
*** class.bopreferences.inc.php 14 Feb 2002 06:57:22 -0000      1.10.2.2
--- class.bopreferences.inc.php 23 Apr 2002 14:30:53 -0000      1.10.2.3
***************
*** 551,555 ****
                                // ==== ACCTNUM ====
                                if ((!isset($this->acctnum))
!                               || ((string)$this->acctnum == ''))
                                {
                                        $this->acctnum = 
$this->obtain_ex_acctnum();
--- 551,555 ----
                                // ==== ACCTNUM ====
                                if ((!isset($this->acctnum))
!                               || ((string)$this->acctnum == ''))
                                {
                                        $this->acctnum = 
$this->obtain_ex_acctnum();
***************
*** 746,750 ****
                                                        // so the FIRST thing 
you do when reading from the db MUST be to "UN-defang"
                                                        // note this IS INDEED 
what happens in api/class,preferences,
!                                                       // unless 
"no_db_defang" is specified, any "user_string" will be defanged
                                                }
                                                else
--- 746,750 ----
                                                        // so the FIRST thing 
you do when reading from the db MUST be to "UN-defang"
                                                        // note this IS INDEED 
what happens in api/class,preferences,
!                                                       // unless 
"no_db_defang" is specified, any "user_string" will be defanged
                                                }
                                                else
***************
*** 1033,1037 ****
                        if ($this->debug_set_prefs > 1) { echo 'email: 
bopreferences: process_ex_accounts_submitted_prefs: pre discovery 
$this->acctnum : ['.serialize($this->acctnum).']<br>'; }
                        if ((!isset($this->acctnum))
!                       || ((string)$this->acctnum == ''))
                        {
                                $this->acctnum = $this->obtain_ex_acctnum();
--- 1033,1037 ----
                        if ($this->debug_set_prefs > 1) { echo 'email: 
bopreferences: process_ex_accounts_submitted_prefs: pre discovery 
$this->acctnum : ['.serialize($this->acctnum).']<br>'; }
                        if ((!isset($this->acctnum))
!                       || ((string)$this->acctnum == ''))
                        {
                                $this->acctnum = $this->obtain_ex_acctnum();
***************
*** 1153,1157 ****
                                        
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str, 
$processed_pref);
                                        // SORT THAT ARRAY by key, so the 
integer array heys go from lowest to hightest
!                                       
ksort($GLOBALS['phpgw']->preferences->data['email']['ex_accounts']);
                                }
                        }
--- 1153,1157 ----
                                        
$GLOBALS['phpgw']->preferences->add_struct('email', $pref_struct_str, 
$processed_pref);
                                        // SORT THAT ARRAY by key, so the 
integer array heys go from lowest to hightest
!                                       
ksort($GLOBALS['phpgw']->preferences->data['email']['ex_accounts']);
                                }
                        }
***************
*** 1169,1173 ****
                        
                        if ((isset($acctnum))
!                       || ((string)$acctnum != ''))
                        {
                                $this->acctnum = $acctnum;
--- 1169,1173 ----
                        
                        if ((isset($acctnum))
!                       || ((string)$acctnum != ''))
                        {
                                $this->acctnum = $acctnum;
***************
*** 1175,1179 ****
                        
                        if ((!isset($this->acctnum))
!                       || ((string)$this->acctnum == ''))
                        {
                                $acctnum = $this->obtain_ex_acctnum();
--- 1175,1179 ----
                        
                        if ((!isset($this->acctnum))
!                       || ((string)$this->acctnum == ''))
                        {
                                $acctnum = $this->obtain_ex_acctnum();
***************
*** 1253,1257 ****
                        $this->account_group = 'extra_accounts';
                        if ((!isset($acctnum))
!                       || ((string)$acctnum == ''))
                        {
                                $acctnum = $this->obtain_ex_acctnum();
--- 1253,1257 ----
                        $this->account_group = 'extra_accounts';
                        if ((!isset($acctnum))
!                       || ((string)$acctnum == ''))
                        {
                                $acctnum = $this->obtain_ex_acctnum();

Index: class.mail_msg_base.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/email/inc/class.mail_msg_base.inc.php,v
retrieving revision 1.61.2.5
retrieving revision 1.61.2.6
diff -C2 -r1.61.2.5 -r1.61.2.6
*** class.mail_msg_base.inc.php 26 Mar 2002 02:20:40 -0000      1.61.2.5
--- class.mail_msg_base.inc.php 23 Apr 2002 14:30:53 -0000      1.61.2.6
***************
*** 38,42 ****
        var $acctnum = 0;
        var $fallback_default_acctnum = 0;
!       
        // ----  args that are known to be used for email
        // externally filled args, such as thru GPC values, or xmlrpc call
--- 38,42 ----
        var $acctnum = 0;
        var $fallback_default_acctnum = 0;
! 
        // ----  args that are known to be used for email
        // externally filled args, such as thru GPC values, or xmlrpc call
***************
*** 58,71 ****
        // raw prefs, before we process them to extract extra acct and/or 
filters data, not of much use
        var $unprocessed_prefs=array();
!       
        // ---- Data Caching  ----
        // (A) session data caching in appsession, for data that is temporary 
in nature
        var $session_cache_enabled=True;
        //var $session_cache_enabled=False;
!       
        // ----  session cache runthru without actuall saving data to appsession
        //var $session_cache_debug_nosave = True;
        var $session_cache_debug_nosave = False;
!       
        // EXTRA ACCOUNTS
        // used for looping thru extra account data during begin request
--- 58,72 ----
        // raw prefs, before we process them to extract extra acct and/or 
filters data, not of much use
        var $unprocessed_prefs=array();
!       var $crypto;
! 
        // ---- Data Caching  ----
        // (A) session data caching in appsession, for data that is temporary 
in nature
        var $session_cache_enabled=True;
        //var $session_cache_enabled=False;
! 
        // ----  session cache runthru without actuall saving data to appsession
        //var $session_cache_debug_nosave = True;
        var $session_cache_debug_nosave = False;
! 
        // EXTRA ACCOUNTS
        // used for looping thru extra account data during begin request
***************
*** 76,81 ****
        // same as above but includes the default account, makes checking 
streams easier
        var $extra_and_default_acounts = array();
!       
!       
        // DEBUG FLAGS generally take int 0, 1, 2, or 3
        var $debug_logins = 0;
--- 77,81 ----
        // same as above but includes the default account, makes checking 
streams easier
        var $extra_and_default_acounts = array();
! 
        // DEBUG FLAGS generally take int 0, 1, 2, or 3
        var $debug_logins = 0;
***************
*** 90,94 ****
        var $skip_args_special_handlers = '';
  
-       
        function mail_msg()
        {
--- 90,93 ----
***************
*** 2013,2017 ****
        function encrypt_email_passwd($data)
        {
!               return $GLOBALS['phpgw']->crypto->encrypt($data);
        }
        
--- 2012,2022 ----
        function encrypt_email_passwd($data)
        {
!               if(!is_object($this->crypto))
!               {
!                       $cryptovars[0] = 
md5($GLOBALS['phpgw_info']['server']['encryptkey']);
!                       $cryptovars[1] = 
$GLOBALS['phpgw_info']['server']['mcrypt_iv'];
!                       $this->crypto = 
CreateObject('phpgwapi.crypto',$cryptovars);
!               }
!               return $this->crypto->encrypt($data);
        }
        
***************
*** 2025,2029 ****
        function decrypt_email_passwd($data)
        {
!               return $GLOBALS['phpgw']->crypto->decrypt($data);
        }
        /*
--- 2030,2047 ----
        function decrypt_email_passwd($data)
        {
!               if(!is_object($this->crypto))
!               {
!                       $cryptovars[0] = 
md5($GLOBALS['phpgw_info']['server']['encryptkey']);
!                       $cryptovars[1] = 
$GLOBALS['phpgw_info']['server']['mcrypt_iv'];
!                       $this->crypto = 
CreateObject('phpgwapi.crypto',$cryptovars);
!               }
!               $unencrypted = $this->crypto->decrypt($data);
!               $encrypted = $this->crypto->encrypt($unencrypted);
!               if($data <> $encrypted)
!               {
!                       $unencrypted = 
$GLOBALS['phpgw']->crypto->decrypt($data);
!                       $encrypted = 
$GLOBALS['phpgw']->crypto->encrypt($unencrypted);
!               }
!               return $unencrypted;
        }
        /*




reply via email to

[Prev in Thread] Current Thread [Next in Thread]