security stop: 2 user from same host.

Jan-Marc Pilawa dc6aa@yahoo.de
Wed, 11 Jul 2001 17:11:03 +0200 (CEST)


using: IMP 2.2.5, horde 1.2.5, 4.0.4

Hello, 

users reported about "security stops". I could
reproduce the Problem. Different users start netscape
on the same host an log in (IMP). Pressing "Inbox" at
the left menu-bar results for one user in an security
stop. 

How can I prevent this? We have more than two users on
the same machine using IMP...

By the way: I suspect a Problem with small
code-fragments i inserted in 

horde.lib, class ImpSession and compose.php3

I inserted a variable $mailnick which i use to build
the from-Adress. $mailnick is feed by a skript
executed during login which gives me the right
mailnick (alias) belonging to a username ($implogin)
I am not very familiar whith php, so there might be a
Problem whith my few lines inserted... Perhaps,
someone can help me.

Best regards

Jan.

Here the code comes:

horde.lib, class ImpSession:
[...]

class ImpSession {
  
  var $classname = 'ImpSession';
  var $persistent_slots = array('data');

[...]

  // session vars
  var $key = '';    // session key
  var $mailbox;     // current mailbox
  var $folders;     // folders var
  var $mailnick;    // Pilawa: mailnick aus Datenbank
  
[...]

  function ImpSession () {
    global $default, $mailnick;
    
    // sane defaults
    $this->server = isset($default->server) ?
$default->server : 'localhost';
    $this->port = isset($default->port) ?
$default->port : 143;
    $this->servtype = isset($default->servtype) ?
$default->servtype : 'imap';
    $this->mailbox = '';
    $this->folders = isset($default->folders) ?
$default->folders : '';
    $this->sortby = isset($default->sort_crit) ?
$default->sort_crit : 0;
    $this->sortdir = isset($default->sort_dir) ?
$default->sort_dir : 0;
    $this->from_server = isset($default->from_server)
? $default->from_server : 'localhost';
    $this->mailnick = $mailnick;  // HERE! 
  } // Constructor
 

[...]

  /* this sets up the $data var for phplib to
serialize the object,
     making everything nice and tidy. */
  function pickle () {
    $this->data = array();
    $this->data['server'] = $this->server;
    $this->data['port'] = $this->port;
    $this->data['servtype'] = $this->servtype;
    $this->data['user'] = $this->user;
    $this->data['pass'] = $this->pass;
    $this->data['mailbox'] = $this->mailbox;
    $this->data['key'] = $this->key;
    $this->data['msgl'] = $this->msgl;
    $this->data['folders'] = $this->folders;
    $this->data['sortby'] = $this->sortby;
    $this->data['sortdir'] = $this->sortdir;
    $this->data['delhide'] = $this->delhide;
    $this->data['offset'] = $this->offset;
    $this->data['from_server'] = $this->from_server;
    $this->data['mailnick'] = $this->mailnick; //HERE
  } // pickle
  
  /* retrieve everything from $this->data, which
phplib has so nicely
     saved for us. */
  function unpickle () {
    $this->server = $this->data['server'];
    $this->port = $this->data['port'];
    $this->servtype = $this->data['servtype'];
    $this->user = $this->data['user'];
    $this->pass = $this->data['pass'];
    $this->mailbox = $this->data['mailbox'];
    $this->key = $this->data['key'];
    $this->msgl = $this->data['msgl'];
    $this->folders = $this->data['folders'];
    $this->sortby = $this->data['sortby'];
    $this->sortdir = $this->data['sortdir'];
    $this->delhide = $this->data['delhide'];
    $this->offset = $this->data['offset'];
    $this->from_server = $this->data['from_server'];
    $this->mailnick = $this->data['mailnick'];
    
    // also go through initialization routines
    $this->config();
    $this->setSorting();
    $this->setMailbox();
    $this->setLabel();
    $this->config();
  } // unpickle
  
} // End ImpSession

[...]

__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de