GitHub SSO fails when the GitHub account has a blank 'name' #1502

Closed
opened 2026-02-05 01:05:00 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @nta on GitHub (Jan 20, 2020).

Describe the bug
When signing in through a GitHub account that does not have a name assigned, an error occurs.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Enable GitHub SSO.
  2. Make sure your GitHub profile has no 'real name' filled out.
  3. Sign in to GitHub on the BookStack signin page.
  4. The following exception is shown in the log:
/framework/src/Illuminate/Database/Connection.php:664, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null at /srv/www/xxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null at /srv/www/xxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)

.. and the sign-in fails with 'An Error Occurred'.

Expected behavior
The account signs in successfully.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.27.5
  • PHP Version: 7.2 (from Ubuntu 18.04)
  • Hosting Method (Nginx/Apache/Docker): Caddy v2 w/ PHP-FPM
Originally created by @nta on GitHub (Jan 20, 2020). **Describe the bug** When signing in through a GitHub account that does not have a name assigned, an error occurs. **Steps To Reproduce** Steps to reproduce the behavior: 1. Enable GitHub SSO. 2. Make sure your GitHub profile has no 'real name' filled out. 3. Sign in to GitHub on the BookStack signin page. 4. The following exception is shown in the log: ``` /framework/src/Illuminate/Database/Connection.php:664, Doctrine\\DBAL\\Driver\\PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null at /srv/www/xxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'name' cannot be null at /srv/www/xxx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105) ``` .. and the sign-in fails with 'An Error Occurred'. **Expected behavior** The account signs in successfully. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.27.5 - PHP Version: 7.2 (from Ubuntu 18.04) - Hosting Method (Nginx/Apache/Docker): Caddy v2 w/ PHP-FPM
OVERLORD added the 🐛 Bug🚪 Authentication🏭 Back-End labels 2026-02-05 01:05:00 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 10, 2020):

Thank you for reporting @nta with the clear instructions of the issue.

I have applied a patch which will set a name based on the email address, if no name is found, and added a test to cover this.

Will be part of the next BookStack patch release.

@ssddanbrown commented on GitHub (Mar 10, 2020): Thank you for reporting @nta with the clear instructions of the issue. I have applied a patch which will set a name based on the email address, if no name is found, and added a test to cover this. Will be part of the next BookStack patch release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1502