-
Notifications
You must be signed in to change notification settings - Fork 796
Closed
Description
Please note that security bugs or issues should be reported to security@pgadmin.org.
Describe the bug
When a user from oauth login, it might not have an email field, if in this case, after login, the page will stuck and keep spinning.
In the error log, we see
File "/usr/pgadmin4/web/pgadmin/tools/user_management/__init__.py", line 106, in current_user_info
email=current_user.email.replace("'","\\\\'"),
AttributeError: 'NoneType' object has no attribute 'replace'
It seems it's a regression of latest release 7.8, it's not reproducible at 7.7.
And I believe this long is the problem ,
| email=current_user.email.replace("'","\\'"), |
To Reproduce
Steps to reproduce the behavior:
- Setup an oauth authentication without email, for example : github and set OAUTH2_USERNAME_CLAIM : login
- Click on Login with github button
- After been redirected /borrow/ page, the page is stuck.
Expected behavior
Login successfully.
Error message
Spinning.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. Windows 10, OSX monterey]
- Version: 7.8
- Mode: Server / Web
- Browser (if running in server mode): [e.g. chrome, safari]
- Package type: [e.g. RPM, DEB, Python, Container, etc.]
Additional context
Add any other context about the problem here.