public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][Patch] - RM 6513 - pgAdmin server mode does not open after password reset.
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][Patch] - RM 6513 - pgAdmin server mode does not open after password reset.
@ 2021-06-10 08:48  Khushboo Vashi <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Khushboo Vashi @ 2021-06-10 08:48 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

Please find the attached patch to fix the RM 6513 - pgAdmin server mode
does not open after password reset.

Thanks,
Khushboo


Attachments:

  [application/octet-stream] forgot_password.patch (1.8K, 3-forgot_password.patch)
  download | inline diff:
diff --git a/web/pgadmin/authenticate/__init__.py b/web/pgadmin/authenticate/__init__.py
index 40c76b2b3..d328b0d24 100644
--- a/web/pgadmin/authenticate/__init__.py
+++ b/web/pgadmin/authenticate/__init__.py
@@ -25,7 +25,7 @@ from flask import session
 
 import config
 from pgadmin.utils import PgAdminModule
-from pgadmin.utils.constants import KERBEROS
+from pgadmin.utils.constants import KERBEROS, INTERNAL
 from pgadmin.utils.csrf import pgCSRFProtect
 
 from .registry import AuthSourceRegistry
@@ -120,7 +120,7 @@ class AuthSourceManager():
         self.form = form
         self.auth_sources = sources
         self.source = None
-        self.source_friendly_name = None
+        self.source_friendly_name = INTERNAL
         self.current_source = None
 
     def as_dict(self):
diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py
index fdfcdbde0..e91a72a57 100644
--- a/web/pgadmin/browser/__init__.py
+++ b/web/pgadmin/browser/__init__.py
@@ -51,6 +51,7 @@ from pgadmin.utils.master_password import validate_master_password, \
 from pgadmin.model import User
 from pgadmin.utils.constants import MIMETYPE_APP_JS, PGADMIN_NODE,\
     INTERNAL, KERBEROS, LDAP, QT_DEFAULT_PLACEHOLDER
+from pgadmin.authenticate import AuthSourceManager
 
 try:
     from flask_security.views import default_render_json
@@ -1326,6 +1327,9 @@ if hasattr(config, 'SECURITY_RECOVERABLE') and config.SECURITY_RECOVERABLE:
 
             if not has_error:
                 after_this_request(view_commit)
+                auth_obj = AuthSourceManager(form, [INTERNAL])
+                session['_auth_source_manager_obj'] = auth_obj.as_dict()
+
                 do_flash(*get_message('PASSWORD_RESET'))
                 login_user(user)
                 return redirect(get_url(_security.post_reset_view) or


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin4][Patch] - RM 6513 - pgAdmin server mode does not open after password reset.
@ 2021-06-10 17:28  Akshay Joshi <[email protected]>
  parent: Khushboo Vashi <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2021-06-10 17:28 UTC (permalink / raw)
  To: Khushboo Vashi <[email protected]>; +Cc: pgadmin-hackers

Thanks, the patch applied.

On Thu, Jun 10, 2021 at 2:19 PM Khushboo Vashi <
[email protected]> wrote:

> Hi,
>
> Please find the attached patch to fix the RM 6513 - pgAdmin server mode
> does not open after password reset.
>
> Thanks,
> Khushboo
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-06-10 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 08:48 [pgAdmin4][Patch] - RM 6513 - pgAdmin server mode does not open after password reset. Khushboo Vashi <[email protected]>
2021-06-10 17:28 ` Akshay Joshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox