mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed Unicode decode error 'utf-8' codec can't decode byte. Fixes #5510
It's a regression of commit id: 04d6d4e2ccc129baa698471ce0680ccabe2282be
This commit is contained in:
@@ -38,4 +38,5 @@ Bug fixes
|
||||
| `Issue #5469 <https://redmine.postgresql.org/issues/5469>`_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog.
|
||||
| `Issue #5473 <https://redmine.postgresql.org/issues/5473>`_ - Fixed post-login redirect location when running in server mode under a non-default root.
|
||||
| `Issue #5480 <https://redmine.postgresql.org/issues/5480>`_ - Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH.
|
||||
| `Issue #5503 <https://redmine.postgresql.org/issues/5503>`_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server.
|
||||
| `Issue #5503 <https://redmine.postgresql.org/issues/5503>`_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server.
|
||||
| `Issue #5510 <https://redmine.postgresql.org/issues/5510>`_ - Fixed Unicode decode error 'utf-8' codec can't decode byte.
|
@@ -120,13 +120,20 @@ class ServerManager(object):
|
||||
res['ver'] = self.ver
|
||||
res['sversion'] = self.sversion
|
||||
if hasattr(self, 'password') and self.password:
|
||||
res['password'] = str(self.password)
|
||||
if hasattr(self.password, 'decode'):
|
||||
res['password'] = self.password.decode('utf-8')
|
||||
else:
|
||||
res['password'] = str(self.password)
|
||||
else:
|
||||
res['password'] = self.password
|
||||
|
||||
if self.use_ssh_tunnel:
|
||||
if hasattr(self, 'tunnel_password') and self.tunnel_password:
|
||||
res['tunnel_password'] = str(self.tunnel_password)
|
||||
if hasattr(self.tunnel_password, 'decode'):
|
||||
res['tunnel_password'] = \
|
||||
self.tunnel_password.decode('utf-8')
|
||||
else:
|
||||
res['tunnel_password'] = str(self.tunnel_password)
|
||||
else:
|
||||
res['tunnel_password'] = self.tunnel_password
|
||||
|
||||
|
Reference in New Issue
Block a user