1
0
Fork 0

[DEV-5492] Do not unserialize PHP objects in _sf2_attributes

Merge branch 'jira-5492'

* jira-5492:
  Revert "[DEV-5492] Add basic tests for UserSession.js"
  [DEV-5492] Do not unserialize PHP objects in _sf2_attributes
  [DEV-5492] Add basic tests for UserSession.js
master
Joseph Frazer 2019-06-10 13:28:49 -04:00
commit 981ba45d7c
1 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,7 @@
/**
* UserSession class
*
* Copyright (C) 2017 R-T Specialty, LLC.
* Copyright (C) 2019 R-T Specialty, LLC.
*
* This file is part of the Liza Data Collection Framework.
*
@ -280,11 +280,17 @@ module.exports = Class.extend( require( 'events' ).EventEmitter,
var key = splits[ i ],
val = splits[ ++i ];
// the values are serialized PHP data; unserialize them
val = php.unserialize( val );
// we do not need _sf2_attributes since they are serialized PHP
// objects and cause problems unserializing when they are
// serialized in PHP7.
if ( key !== '_sf2_attributes' )
{
// the values are serialized PHP data; unserialize them
val = php.unserialize( val );
// add to the session data
session_data[ key ] = val;
// add to the session data
session_data[ key ] = val;
}
}
}