PGADMIN保存了在非ADMIN的共享服务器上保存密码

发布于 2025-02-04 21:07:05 字数 1562 浏览 3 评论 0 原文

在基于官方Docker Image版本6.10的服务器模式下PGADMIN的清理安装中,我有以下问题:

将共享服务器添加为Admin。

登录为无私人用户,在properties>中设置服务器用户名。联系。

尝试连接插入密码并保存它 - 有效。

断开连接服务器(或登录)然后(re)连接服务器,并遇到错误:

没有足够的值来解开包装(预期3,get 2)

log说:

2022-06-07 09:03:28,114: ERROR     pgadmin:        'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
pgadmin-and-backup-prod_1  | Traceback (most recent call last):
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/utils/driver/psycopg2/connection.py", line 242, in _decode_password
pgadmin-and-backup-prod_1  |     password = password.decode()
pgadmin-and-backup-prod_1  | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
pgadmin-and-backup-prod_1  | 2022-06-07 09:03:28,116: ERROR     pgadmin:        not enough values to unpack (expected 3, got 2)
pgadmin-and-backup-prod_1  | Traceback (most recent call last):
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py", line 1418, in connect
pgadmin-and-backup-prod_1  |     status, errmsg = conn.connect(
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/utils/driver/psycopg2/connection.py", line 294, in connect
pgadmin-and-backup-prod_1  |     is_error, errmsg, password = self._decode_password(encpass, manager,
pgadmin-and-backup-prod_1  | ValueError: not enough values to unpack (expected 3, got 2)

我已更改config_local.py文件以配置oauth2 authentication使用Azure AD。

请注意,获取保存的密码似乎对管理员用户工作正常(可以断开连接,重新连接无问题)。

On a clean installation of PgAdmin in server mode based on official docker image version 6.10 I have the following issue:

Add a shared server as admin.

Login as an unprivileged user, set server Username under Properties > Connection.

Try to connect inserting the password and saving it - works.

Disconnect Server (or logout) then (re)Connect Server, and encounter error:

not enough values to unpack (expected 3, got 2)

log says:

2022-06-07 09:03:28,114: ERROR     pgadmin:        'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
pgadmin-and-backup-prod_1  | Traceback (most recent call last):
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/utils/driver/psycopg2/connection.py", line 242, in _decode_password
pgadmin-and-backup-prod_1  |     password = password.decode()
pgadmin-and-backup-prod_1  | UnicodeDecodeError: 'utf-8' codec can't decode byte 0x9a in position 1: invalid start byte
pgadmin-and-backup-prod_1  | 2022-06-07 09:03:28,116: ERROR     pgadmin:        not enough values to unpack (expected 3, got 2)
pgadmin-and-backup-prod_1  | Traceback (most recent call last):
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py", line 1418, in connect
pgadmin-and-backup-prod_1  |     status, errmsg = conn.connect(
pgadmin-and-backup-prod_1  |   File "/pgadmin4/pgadmin/utils/driver/psycopg2/connection.py", line 294, in connect
pgadmin-and-backup-prod_1  |     is_error, errmsg, password = self._decode_password(encpass, manager,
pgadmin-and-backup-prod_1  | ValueError: not enough values to unpack (expected 3, got 2)

I have changed config_local.py file to configure oauth2 authentication with Azure AD.

NOTE that fetching saved passwords seem to work fine for the admin user (can disconnect, reconnect no problem).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

回忆凄美了谁 2025-02-11 21:07:05

这是在6.15版本上修复的:

问题#5367-如果在解码密码时发生异常,则应返回正确的值。

This was fixed on version 6.15: https://www.pgadmin.org/docs/pgadmin4/latest/release_notes_6_15.html

Issue #5367 - Ensure that the correct value should be returned if an exception occurs while decoding the password.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文