Bugzilla – Attachment 61807 Details for
Bug 12930
Web installer does not show login errors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12930 - Implemented error message display for invalid username or password on web installer login
Bug-12930---Implemented-error-message-display-for-.patch (text/plain), 2.82 KB, created by
Marc Véron
on 2017-04-03 18:39:08 UTC
(
hide
)
Description:
Bug 12930 - Implemented error message display for invalid username or password on web installer login
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-04-03 18:39:08 UTC
Size:
2.82 KB
patch
obsolete
>From e3205fad87c58d7227ba0dd79db2b9171bb4fb3c Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sun, 19 Mar 2017 16:28:35 +0000 >Subject: [PATCH] Bug 12930 - Implemented error message display for invalid > username or password on web installer login >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Now InstallAuth.pm hands the invalid_username_or_password variable to >the template file auth.tt if the user entered an invalid username or >password and this is displayed to the user > >I tested both patches together by direkctly calling >[MY SERVER]/cgi-bin/koha/installer/install.pl?step=1&op=updatestructure >Works as expected >Signed-off-by: Marc Véron <veron@veron.ch> >--- > C4/InstallAuth.pm | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > >diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm >index c91bde8..445c18b 100644 >--- a/C4/InstallAuth.pm >+++ b/C4/InstallAuth.pm >@@ -116,11 +116,11 @@ sub get_template_and_user { > my $template = C4::Templates->new( $interface, $filename, $tmplbase, $query); > > my ( $user, $cookie, $sessionID, $flags ) = checkauth( >- $in->{'query'}, >- $in->{'authnotrequired'}, >- $in->{'flagsrequired'}, >- $in->{'type'} >- ); >+ $in->{'query'}, >+ $in->{'authnotrequired'}, >+ $in->{'flagsrequired'}, >+ $in->{'type'} >+ ); > > # use Data::Dumper;warn "utilisateur $user cookie : ".Dumper($cookie); > >@@ -290,6 +290,7 @@ sub checkauth { > my $password = $query->param('password'); > C4::Context->_new_userenv($sessionID); > my ( $return, $cardnumber ) = checkpw( $userid, $password ); >+ > if ($return) { > $loggedin = 1; > # open L, ">>/tmp/sessionlog"; >@@ -330,10 +331,10 @@ sub checkauth { > } > } > else { >- if ($userid) { >- $info{'invalid_username_or_password'} = 1; >- C4::Context->_unset_userenv($sessionID); >- } >+ if ($userid) { >+ $info{'invalid_username_or_password'} = 1; >+ C4::Context->_unset_userenv($sessionID); >+ } > } > } > >@@ -379,6 +380,10 @@ sub checkauth { > $template->param( login => 1 ); > $template->param( loginprompt => 1 ) unless $info{'nopermission'}; > >+ if ($info{'invalid_username_or_password'} == 1) { >+ $template->param( 'invalid_username_or_password' => $info{'invalid_username_or_password'}); >+ } >+ > $template->param( \%info ); > $cookie = $query->cookie( > -name => 'CGISESSID', >@@ -423,7 +428,10 @@ sub checkpw { > # some features won't be effective : modify systempref, modify MARC structure, > return 2; > } >- return 0; >+ else{ >+ >+ >+ } > } > > END { } # module clean-up code here (global destructor) >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12930
:
61768
|
61777
|
61807
|
61808
|
62116
|
62117
|
62166