-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgAdmin imports servers to the wrong accounts in the server version with webserver auth enabled #6815
Comments
konradziczek
changed the title
pgAdmin imports servers to the wrong accounts in the web version
pgAdmin imports servers to the wrong accounts in the web version with webserver auth enabled
Oct 4, 2023
konradziczek
changed the title
pgAdmin imports servers to the wrong accounts in the web version with webserver auth enabled
pgAdmin imports servers to the wrong accounts in the server version with webserver auth enabled
Oct 4, 2023
I think I found where the problem is: pgadmin4/web/pgadmin/utils/__init__.py Line 810 in 0b3c798
There are no email addresses in webserver auth method, only usernames. For this reason, it searches for users with an empty email address and provides any one. |
Bugfix proposed #6818 |
Hi @amarel123, |
yogeshmahajan-1903
assigned adityatoshniwal and unassigned yogeshmahajan-1903 and adityatoshniwal
Jan 3, 2024
This is working fine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please note that security bugs or issues should be reported to [email protected].
Describe the bug
After importing the .json file with the server, sometimes (not always) it is imported to another user's account, and the list of servers in my account is still empty. The problem never appears when creating a server manually.
To Reproduce
The main thing that I think may be related to the problem is that I am using the following configuration:
AUTHENTICATION_SOURCES = ['webserver']
Users are authorized using basic auth, and the accounts are retrieved by a PHP script. Such accounts in the pgAdmin sqlite database do not have an email, only a username.
Expected behavior
Servers are always imported under the account of the user who imports them.
Error message
No error message - after import, a message appears stating that the operation was successful.
Screenshots
Select from pgAdmin sqlite "server" table:
The last server was imported on user 12 and as you can see it was added on user 2. User 2 confirmed to me that he sees the server imported on my account in his account.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: