Skip to content

Commit

Permalink
* [FIX] Fixes #185.Thanks to @bitking
Browse files Browse the repository at this point in the history
* [FIX] Fixes #186. Thanks to @wagnst
* [FIX] Related #189. Login not done for the fisrt time randomly.
  • Loading branch information
nuxsmin committed Jan 5, 2016
1 parent 19309c0 commit 8e86d75
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
10 changes: 4 additions & 6 deletions inc/Init.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,9 @@ private static function logout()
{
self::wrLogoutInfo();

session_unset();
//session_unset();
session_destroy();
session_start();
}

/**
Expand Down Expand Up @@ -580,7 +581,7 @@ private static function checkVersion()
}

/**
* Inicialiar la sesión de usuario
* Inicializar la sesión de usuario
*/
private static function initSession()
{
Expand All @@ -592,11 +593,8 @@ private static function initSession()
setcookie(session_name(), '', time() - 42000, '/');
}

self::wrLogoutInfo();
self::logout();

session_unset();
session_destroy();
session_start();
return;
}

Expand Down
2 changes: 1 addition & 1 deletion inc/themes/classic/css/styles.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions inc/themes/classic/sessionbar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
title="<?php echo _('Cambiar clave de usuario'); ?>"
data-itemid="<?php echo $userId; ?>"
Onclick="sysPassUtil.Common.usrUpdPass(this,<?php echo \SP\Controller\ActionsInterface::ACTION_USR_USERS_EDITPASS; ?>, '<?php echo $sk; ?>')" />
<img src="imgs/preferences.png" class="iconMini" title="<?php echo _('Preferencias'); ?>"
data-itemid="<?php echo $userId; ?>"
OnClick="sysPassUtil.Common.doAction(<?php echo \SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES; ?>)" />
<?php else: ?>
<?php echo $userName, ' (', $userGroupName, ') ', $adminApp; ?>
<?php endif; ?>
<img src="imgs/preferences.png" class="iconMini" title="<?php echo _('Preferencias'); ?>"
data-itemid="<?php echo $userId; ?>"
OnClick="sysPassUtil.Common.doAction(<?php echo \SP\Controller\ActionsInterface::ACTION_USR_PREFERENCES; ?>)" />
<img src="imgs/exit.png" title="<?php echo _('Salir'); ?>" OnClick="sysPassUtil.Common.doLogout();"/>
</div>
</div>
2 changes: 1 addition & 1 deletion inc/themes/material-blue/css/styles.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inc/themes/material-blue/install.inc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input id="dbhost" name="dbhost" type="text" required class="mdl-textfield__input fg-blue100"
value="<?php echo $dbhost; ?>" autocomplete="off" autofocus pattern="[0-9a-zA-Z$_-]+">
value="<?php echo $dbhost; ?>" autocomplete="off" autofocus pattern="[0-9a-zA-Z_-\.]+">
<label class="mdl-textfield__label"
for="dbhost"><?php echo _('Servidor BBDD para sysPass'); ?></label>
</div>
Expand Down
6 changes: 3 additions & 3 deletions web/MainC.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,15 @@ public function getLogin()
));

// Comprobar y parsear los parámetros GET para pasarlos como POST en los inputs
$this->view->assign('getParams');
$getParams = '';

if (count($_GET) > 0) {
foreach ($_GET as $param => $value) {
$getParams['g_' . \SP\Html::sanitize($param)] = \SP\Html::sanitize($value);
}

$this->view->assign('getParams', $getParams);
}

$this->view->assign('getParams', $getParams);
}

/**
Expand Down

0 comments on commit 8e86d75

Please sign in to comment.