From 4632a7faba44f28d0598a88da34563ab691fbf9d Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Fri, 29 May 2020 13:07:02 +0530 Subject: [PATCH] Fixed an issue where pgadmin detects the wrong browser version of the Microsoft Edge. Fixes #5465 --- docs/en_US/release_notes_4_23.rst | 1 + web/pgadmin/browser/__init__.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_4_23.rst b/docs/en_US/release_notes_4_23.rst index 035b15228..5635675f7 100644 --- a/docs/en_US/release_notes_4_23.rst +++ b/docs/en_US/release_notes_4_23.rst @@ -18,4 +18,5 @@ Bug fixes ********* | `Issue #5416 `_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button. +| `Issue #5465 `_ - Fixed an issue where the Edge browser version is showing wrong and warning message gets displayed. | `Issue #5539 `_ - Fixed typo in exception keyword. \ No newline at end of file diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index a97a5a132..d3fa880c7 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -565,8 +565,18 @@ def index(): browser_name = 'Chrome' elif browser == 'firefox' and version < 65: browser_name = 'Firefox' - elif browser == 'edge' and version < 44: + # comparing EdgeHTML engine version + elif browser == 'edge' and version < 18: browser_name = 'Edge' + # browser version returned by edge browser is actual EdgeHTML + # engine version. Below code gets actual browser version using + # EdgeHTML version + engine_to_actual_browser_version = { + 16: 41, + 17: 42, + 18: 44 + } + version = engine_to_actual_browser_version.get(version, '< 44') elif browser == 'safari' and version < 12: browser_name = 'Safari' elif browser == 'msie':