[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.jsmaster
commit
981ba45d7c
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* UserSession class
|
* 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.
|
* 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 ],
|
var key = splits[ i ],
|
||||||
val = splits[ ++i ];
|
val = splits[ ++i ];
|
||||||
|
|
||||||
// the values are serialized PHP data; unserialize them
|
// we do not need _sf2_attributes since they are serialized PHP
|
||||||
val = php.unserialize( val );
|
// 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
|
// add to the session data
|
||||||
session_data[ key ] = val;
|
session_data[ key ] = val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue