Correction pb de token interne
This commit is contained in:
parent
dba4975ce0
commit
050f7259d4
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace manager;
|
||||
use \manager\Repo;
|
||||
use \manager\sessionManager;
|
||||
|
||||
|
||||
class ResourceDispatcher{
|
||||
|
@ -245,10 +247,21 @@
|
|||
header('Content-Type: '.$this->header);
|
||||
|
||||
// On recupere le contenu
|
||||
$svg_content = file_get_contents($this->path);
|
||||
$content = file_get_contents($this->path);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
///////////// SI FICHIER JS ////////////
|
||||
////////////////////////////////////////
|
||||
if( $this->flags['extension'] == 'js' )
|
||||
$content = 'var js_access_token = "'. substr($_SESSION['session_token'], 0, 40) .'";' . "\n\n" . $content;
|
||||
|
||||
|
||||
|
||||
|
||||
// On affiche tout
|
||||
echo str_replace( '</svg>', $this->stylesheet.'</svg>', $svg_content );
|
||||
echo str_replace( '</svg>', $this->stylesheet.'</svg>', $content );
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,10 +276,10 @@
|
|||
|
||||
|
||||
// On inclut le contenu
|
||||
$svg_content = file_get_contents($this->path);
|
||||
$content = file_get_contents($this->path);
|
||||
|
||||
// On retourne tout
|
||||
return str_replace( '</svg>', $this->stylesheet.'</svg>', $svg_content );
|
||||
return str_replace( '</svg>', $this->stylesheet.'</svg>', $content );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
/* INITIALISATION DE SESSION */
|
||||
/*****************************/
|
||||
private static function reset_session($session_id=null){
|
||||
|
||||
// On ferme la session
|
||||
session_destroy();
|
||||
|
||||
|
@ -36,7 +37,6 @@
|
|||
// On met a jour le token
|
||||
self::update_token();
|
||||
|
||||
|
||||
header('Refresh: 0');
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,6 @@
|
|||
self::reset_session( $sessid ); // On initialise la session (bon id session)
|
||||
|
||||
|
||||
// si id session invalide
|
||||
|
||||
|
||||
/* [3] Verification du token
|
||||
==============================================================*/
|
||||
|
|
Loading…
Reference in New Issue