Permalink
Browse files

Solución problema de sesión ¿?

  • Loading branch information...
rubenlh91 committed Apr 9, 2018
1 parent c3d97fd commit 3cf7b037bb550621a87e3f1b29b2d5d9f8ce534b
Showing with 11 additions and 7 deletions.
  1. +6 −3 bootstrap.php
  2. +3 −0 login.php
  3. +1 −1 login_totp.php
  4. +0 −2 logout.php
  5. +1 −1 totp.php
View
@@ -5,12 +5,15 @@
if (version_compare(phpversion(), '5.5.38', '<')) die ("<h1>Versión de PHP incompatible</h1>\n<p>Necesita PHP 5.5.38 o superior para poder utilizar esta aplicación.</p>");
// Duración de la sesión: 3600 segundos (1 hora)
ini_set("session.cookie_lifetime","3600");
// CONFIGURACIÓN DE LA SESIÓN
ini_set("session.use_cookies", 1);
ini_set("session.use_only_cookies", 1);
ini_set("session.cookie_lifetime","3600"); // Duración de la sesión: 3600 segundos (1 hora)
ini_set("session.gc_maxlifetime","3600");
session_name("is");
session_start();
// CONFIGURACIÓN INICIAL
error_reporting(0);
date_default_timezone_set('Europe/Madrid');
View
@@ -151,9 +151,12 @@
$_SESSION['id_pag'] = $id_reg0[0];
unset($_SESSION['intentos']);
session_regenerate_id(true);
if ($dni == $clave0 || (strlen($codigo) < '12'))
{
$_SESSION['autentificado'] = 1;
$_SESSION['cambiar_clave'] = 1;
header("location:clave.php?tour=1");
View
@@ -72,7 +72,7 @@
<div class="form-group text-center">
<div id="totp" style="text-align: center !important;">
<?php for ($i = 1; $i < 7; $i++): ?>
<input type="number" class="form-control text-center" id="totp-code-<?php echo $i; ?>" name="totp-code-<?php echo $i; ?>" value="" maxlength="1" min="0" max="9" style="display: inline-block !important; width: 40px !important; padding: 0;">
<input type="text" class="form-control text-center" id="totp-code-<?php echo $i; ?>" name="totp-code-<?php echo $i; ?>" value="" maxlength="1" style="display: inline-block !important; width: 40px !important; padding: 0;">
<?php endfor; ?>
<input type="hidden" id="totp_code" name="totp_code" value="">
<input type="hidden" name="totp_verificado" value="1">
View
@@ -3,8 +3,6 @@
session_unset();
session_destroy();
session_start();
session_regenerate_id(true);
header("Location://".$config['dominio']."/intranet/login.php");
exit();
View
@@ -215,7 +215,7 @@
<label for="totp-code-1">Introduce código temporal</label>
<div id="totp" style="text-align: center !important;">
<?php for ($i = 1; $i < 7; $i++): ?>
<input type="number" class="form-control text-center" id="totp-code-<?php echo $i; ?>" name="totp-code-<?php echo $i; ?>" value="" maxlength="1" min="0" max="9" style="display: inline-block !important; width: 40px !important; padding: 0;">
<input type="text" class="form-control text-center" id="totp-code-<?php echo $i; ?>" name="totp-code-<?php echo $i; ?>" value="" maxlength="1" style="display: inline-block !important; width: 40px !important; padding: 0;">
<?php endfor; ?>
</div>
</div>

0 comments on commit 3cf7b03

Please sign in to comment.