Skip to content

Commit 4dc9f80

Browse files
committed
Manually merge PR204 to fix routing of migcert reset password requests.
git-svn-id: svn+ssh://svn.code.sf.net/p/migrid/code/trunk@6210 b75ad72c-e7d7-11dd-a971-7dbc132099af
1 parent 6702515 commit 4dc9f80

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

mig/shared/accountreq.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --- BEGIN_HEADER ---
55
#
66
# accountreq - helpers for certificate/OpenID account requests
7-
# Copyright (C) 2003-2024 The MiG Project lead by Brian Vinter
7+
# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH
88
#
99
# This file is part of MiG.
1010
#
@@ -603,7 +603,7 @@ def account_request_template(configuration, password=True, default_values={}):
603603

604604

605605
def account_pw_reset_template(configuration, default_values={}):
606-
"""A general form template used for various password reset requests"""
606+
"""A general form template used for various password reset requests."""
607607

608608
html = """
609609
<div id='account-pw-reset-grid' class='form_container'>
@@ -634,7 +634,7 @@ def account_pw_reset_template(configuration, default_values={}):
634634
<form method='%(form_method)s' action='%(target_op)s.py'>
635635
<input type='hidden' name='%(csrf_field)s' value='%(csrf_token)s' />
636636
<!-- NOTE: cert_id field to allow either full DN or email -->
637-
<input type='text' name='cert_id' required />
637+
<input type='text' name='cert_id' value='%(cert_id)s' required />
638638
<select class='form-control themed-select html-select' id='reset_auth_type'
639639
name='auth_type' minlength=3 maxlength=4
640640
placeholder='The kind of authentication for which to reset password'

mig/shared/functionality/reqpwreset.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --- BEGIN_HEADER ---
55
#
66
# reqpwreset - Account password reset request backend
7-
# Copyright (C) 2003-2023 The MiG Project lead by Brian Vinter
7+
# Copyright (C) 2003-2025 The MiG Project by the Science HPC Center at UCPH
88
#
99
# This file is part of MiG.
1010
#
@@ -135,16 +135,16 @@ def main(client_id, user_arguments_dict, environ=None):
135135
(configuration.user_mig_oid_title, auth_type)}
136136
output_objects.append(migoidc_link)
137137
elif auth_flavor == AUTH_MIG_CERT:
138-
extcert_url = os.path.join(os.path.dirname(bin_url), 'extcert.py')
139-
extcert_link = {'object_type': 'link', 'destination': extcert_url,
138+
migcert_url = os.path.join(os.path.dirname(bin_url), 'migcert.py')
139+
migcert_link = {'object_type': 'link', 'destination': migcert_url,
140140
'text': 'Change %s %s password' %
141141
(configuration.user_mig_cert_title, auth_type)}
142-
output_objects.append(extcert_link)
142+
output_objects.append(migcert_link)
143143
else:
144144
form_method = 'post'
145145
csrf_limit = get_csrf_limit(configuration)
146146
fill_helpers = {'form_method': form_method, 'csrf_field': csrf_field,
147-
'csrf_limit': csrf_limit,
147+
'csrf_limit': csrf_limit, 'cert_id': '',
148148
'short_title': configuration.short_title}
149149
target_op = "reqpwresetaction"
150150
csrf_token = make_csrf_token(configuration, form_method, target_op,

0 commit comments

Comments
 (0)