- Issue created by @patrickharris
- Status changed to Needs review
5 months ago 10:38pm 1 August 2024
When simplesamlphp_auth creates a new user via externalauth->register()
it does not supply $account_data
. Externalauth therefore prefixes the supplied $authname
with the prefix 'simplesamlphp_auth_' and uses this value for the init and name account fields. These extra 19 letters mean that an email of length more than 41 characters will result in a DB error on externalauth's initial $account->save()
since Drupal's name column in users_field_data table is limited to 60 characters. The watchdog error produced is String data, right truncated: 7 ERROR: value too long for type character varying(60): INSERT INTO "users_field_data" ...
.
If we could supply externalauth with the $account_data['name'] value it wants we could support longer emails.
Attempt to register a user account with an email (and therefore name) of 42 characters, e.g. aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@aaa.com.
Supply externalauth->register()
with an $account_data['name']
value.
$account = $this->externalauth->register($authname, 'simplesamlphp_auth', ['name' => $authname]);
Needs review
4.0
Code