Describe the issue or problem
Trying to register from the Shibboleth Plugin fails with a 500 error.
Steps I took leading up to the issue
- Install and configure the Shibboleth plugin
- Try to register via Institutional Login
What application are you using?
OJS 3.3.0-13
Additional information
Snippet from the error log:
PHP Fatal error: Uncaught PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'username' at row 1 in /var/www/html/ojs-3.3.0-13/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/html/ojs-3.3.0-13/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()\n#1 /var/www/html/ojs-3.3.0-13/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2
[…]
Steps I took to investigate the issue
After digging through the code I suspect the problem lies within the ShibbolethHandler.inc.php
, line 555:
$user->setUsername($userEmail);
It seems like the userEmail is simply assigned here to the username without any further formatting. However, the character_maximum_length of the username is 32 and furthermore only alphanumeric characters are allowed.
Any help is appreciated!
Best,
Annalena