When using self registration in opac and filling out the requested fields you are forwarded to a login. Either this is prefilled or you can enter the credentials provided on the same site. When clicking login opac-user.pl opens showing a login form. The user we just created is not logged in. To recreate: a) open http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory b) set PatronSelfRegistration o allow c) set PatronSelfRegistrationDefaultCategory to Self registration d) logout or open a private tab e) http://localhost:8080/cgi-bin/koha/opac-memberentry.pl and enter required fields d) Registration complete! appears with a prefilled login form. Click Log in. e) Check you are not logged in
Created attachment 168778 [details] [review] Bug 37324: Self registration complete login form won't login user This patch fixes the self registration complete login form which appears after a complete self registration process. To test: a) open http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory b) set PatronSelfRegistration to allow c) set PatronSelfRegistrationDefaultCategory to Self registration d) logout or open a private tab e) http://localhost:8080/cgi-bin/koha/opac-memberentry.pl and enter required fields f) Registration complete! appears with a prefilled login form. Click Log in. g) Check you are not logged in apply patch and redo steps e-f and check that login worked.
The patch doesn't apply - sha1/fake ancestor error: git bz apply 37324 Bug 37324 - Self registration complete login form won't login user 168778 - Bug 37324: Self registration complete login form won't login user Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 37324: Self registration complete login form won't login user error: sha1 information is lacking or useless (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt). error: could not build fake ancestor Patch failed at 0001 Bug 37324: Self registration complete login form won't login user
I am not sure if this change is right: - <input class="form-control" type="text" id="userid" size="10" name="userid" value="" autocomplete="off" /> + <input class="form-control" type="text" id="userid" size="10" name="login_userid" value="" The auto-complete was added intentionally to avoid the browser completing the password field with - in some cases - someone else's password I believe.
I was thinking about bugs similar to Bug 29025
(In reply to Katrin Fischer from comment #3) > I am not sure if this change is right: > - <input class="form-control" > type="text" id="userid" size="10" name="userid" value="" autocomplete="off" > /> > + <input class="form-control" > type="text" id="userid" size="10" name="login_userid" value="" > > The auto-complete was added intentionally to avoid the browser completing > the password field with - in some cases - someone else's password I believe. The only changes I made were userid to login_userid and password to login_password. The prefilled form is caused by system preference PatronSelfRegistrationPrefillForm
True, but why is it necessary to remove the auto-complete?
(In reply to Katrin Fischer from comment #6) > True, but why is it necessary to remove the auto-complete? Argh. I am sorry. I totally misread the patch line. It's all good!
Created attachment 168969 [details] [review] Bug 37324: Self registration complete login form won't login user This patch fixes the self registration complete login form which appears after a complete self registration process. To test: a) open http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory b) set PatronSelfRegistration to allow c) set PatronSelfRegistrationDefaultCategory to Self registration d) logout or open a private tab e) http://localhost:8080/cgi-bin/koha/opac-memberentry.pl and enter required fields f) Registration complete! appears with a prefilled login form. Click Log in. g) Check you are not logged in apply patch and redo steps e-f and check that login worked.
(In reply to David Nind from comment #2) > The patch doesn't apply - sha1/fake ancestor error: > > git bz apply 37324 > > Bug 37324 - Self registration complete login form won't login user > > 168778 - Bug 37324: Self registration complete login form won't login user > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 37324: Self registration complete login form won't login user > error: sha1 information is lacking or useless > (koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt). > error: could not build fake ancestor > Patch failed at 0001 Bug 37324: Self registration complete login form won't > login user I was on signing off #33766 when I opened this bug. Now applying should work
Created attachment 169035 [details] [review] Bug 37324: Self registration complete login form won't login user This patch fixes the self registration complete login form which appears after a complete self registration process. To test: a) open http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory b) set PatronSelfRegistration to allow c) set PatronSelfRegistrationDefaultCategory to Self registration d) logout or open a private tab e) http://localhost:8080/cgi-bin/koha/opac-memberentry.pl and enter required fields f) Registration complete! appears with a prefilled login form. Click Log in. g) Check you are not logged in apply patch and redo steps e-f and check that login worked. Signed-off-by: David Nind <david@davidnind.com>
(In reply to Jan Kissig from comment #9) > I was on signing off #33766 when I opened this bug. Now applying should work Thanks Jan for fixing! Now signed off.
Created attachment 169184 [details] [review] Bug 37324: Self registration complete login form won't login user This patch fixes the self registration complete login form which appears after a complete self registration process. To test: a) open http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=PatronSelfRegistrationDefaultCategory b) set PatronSelfRegistration to allow c) set PatronSelfRegistrationDefaultCategory to Self registration d) logout or open a private tab e) http://localhost:8080/cgi-bin/koha/opac-memberentry.pl and enter required fields f) Registration complete! appears with a prefilled login form. Click Log in. g) Check you are not logged in apply patch and redo steps e-f and check that login worked. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Related to CSRF changes
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
Backported to 24.05.x for upcoming 24.05.04
"cud-" not in 23.11.x