-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hello,
we're having some plugins in Staffbase build with the Staffbase SDK.
When starting a session with
new PluginSession($pluginId, $pluginSecret);
I get the following error in PHP, because our Plugin-Names contain dots (.) in their names which was given by the Staffbase team:
Core: Error handler (FE): PHP Warning: session_name(): session.name "vendor.myplugin" must not be numeric, empty, contain null bytes or any of the following characters "=,;.[ \t\r\n\013\014" in /vendor/staffbase/plugins-sdk-php/src/SessionHandling/SessionHandlerTrait.php line 40
We could not change the name for the plugin ID by ourselves, but in the SDK the plugin ID is used also as session name, which is not allowed because of the dot (.) in the name.
For our project I added a patch which changes the line to following:
$search = ['=', ',', ';', "'", '.', '['];
$replace = '';
session_name(str_replace($search, $replace, $name));
It would be nice to get an update of the SDK which fixes the problem.