MyXoops Forum

Forum - myXOOPS German Support

4 - 2 = ?  
Geben Sie das Ergebnis der Berechnung ein
Sie haben max. 10 Versuche.
 
* = Erforderlich

Bugfix für Sicherheitslücke Identitätswechsel - XOOPS 2.3.1

Betreff: Bugfix für Sicherheitslücke Identitätswechsel - XOOPS 2.3.1
von alfred am 26.11.2008 01:00:53

Anleitung:

ausgehend vom XOOPS_ROOT_PATH (da wo die mainfile.php liegt)

Datei /include/checklogin.php:
Suche nach (ca Zeile 81):

// Set cookie for rememberme
if ( !empty($xoopsConfig['usercookie']) ) {
  if ( !empty(
$_POST["rememberme"]) ) {
    
setcookie($xoopsConfig['usercookie'], $_SESSION['xoopsUserId'], time() + 31536000'/',  ''0);
  } else {
    
setcookie($xoopsConfig['usercookie'], 0, -1'/',  ''0);
  }
}


ersetzen mit

// Set cookie for rememberme
if ( !empty($xoopsConfig['usercookie']) ) {
  if ( !empty(
$_POST["rememberme"]) ) {
    
setcookie($xoopsConfig['usercookie'], $_SESSION['xoopsUserId']."-".md5($user->getVar('pass').XOOPS_DB_PASS.XOOPS_DB_PREFIX), time() + 31536000'/',  ''0);
  } else {
    
setcookie($xoopsConfig['usercookie'], 0, -1'/',  ''0);
  }
}


weiter Datei /include/common.php (Zeile 262), suche nach:

// Load xoopsUserId from cookie if "Remember me" is enabled.
if (empty($_SESSION['xoopsUserId']) && !empty($xoopsConfig['usercookie']) && !empty($_COOKIE[$xoopsConfig['usercookie']])) {
    
$_SESSION['xoopsUserId'] = $_COOKIE[$xoopsConfig['usercookie']];
}


ersetzen mit

// Load xoopsUserId from cookie if "Remember me" is enabled.
if (empty($_SESSION['xoopsUserId']) && !empty($xoopsConfig['usercookie']) && !empty($_COOKIE[$xoopsConfig['usercookie']])) {
   
$sess_data explode("-",$_COOKIE[$xoopsConfig['usercookie']]);
   if (
count($sess_data)==2$_SESSION['xoopsUserId'] = $sess_data[0];
}


weiter gleiche Datei (Zeile 273): aus

} else {
        
$GLOBALS["sess_handler"]->update_cookie();
        if (isset(
$_SESSION['xoopsUserGroups'])) {
            
$xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
        } else {
            
$_SESSION['xoopsUserGroups'] = $xoopsUser->getGroups();
        }
        
$xoopsUserIsAdmin $xoopsUser->isAdmin();
    }


ein :

} else {
      if (!empty(
$sess_data) && (md5($xoopsUser->getVar('pass').XOOPS_DB_PASS.XOOPS_DB_PREFIX) != $sess_data[1])) {
     
$xoopsUser '';
          
$_SESSION = array();
          
session_destroy();
    } else {
          
$GLOBALS["sess_handler"]->update_cookie();
          if (isset(
$_SESSION['xoopsUserGroups'])) {
            
$xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
          } else {
            
$_SESSION['xoopsUserGroups'] = $xoopsUser->getGroups();
          }
          
$xoopsUserIsAdmin $xoopsUser->isAdmin();
    }
    }


Damit ist dann das XOOPS wieder sicher.
Wir informieren weiter dazu.
Wer Hilfe dazu benötigt, bitte melden.

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
Modulentwicklung New Xoops Xcreate Module 0 4086 26.11.2025 15:22
efkan Gehe zum letzten Beitrag
Modulentwicklung XOOPS Custom Field Module 1 1557 24.11.2025 11:21
Goffy Gehe zum letzten Beitrag