diff --git a/docs/en_US/release_notes_4_22.rst b/docs/en_US/release_notes_4_22.rst index 3feb8c143..7c3d9ddd6 100644 --- a/docs/en_US/release_notes_4_22.rst +++ b/docs/en_US/release_notes_4_22.rst @@ -38,4 +38,5 @@ Bug fixes | `Issue #5469 `_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog. | `Issue #5473 `_ - Fixed post-login redirect location when running in server mode under a non-default root. | `Issue #5480 `_ - Fixed an issue where the background job creation fails if there is only a version-specific python binary available in PATH. -| `Issue #5503 `_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server. \ No newline at end of file +| `Issue #5503 `_ - Clarify and correct the docs on enabling the pl/debugger plugin on the server. +| `Issue #5510 `_ - Fixed Unicode decode error 'utf-8' codec can't decode byte. \ No newline at end of file diff --git a/web/pgadmin/utils/driver/psycopg2/server_manager.py b/web/pgadmin/utils/driver/psycopg2/server_manager.py index 64004c691..6e242403d 100644 --- a/web/pgadmin/utils/driver/psycopg2/server_manager.py +++ b/web/pgadmin/utils/driver/psycopg2/server_manager.py @@ -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