View | Details | Raw Unified | Return to bug 36084
Collapse All | Expand All

(-)a/C4/Auth.pm (-7 / +13 lines)
Lines 193-198 sub get_template_and_user { Link Here
193
            { skip_csrf_check => 1 },
193
            { skip_csrf_check => 1 },
194
        );
194
        );
195
    }
195
    }
196
    my $session = get_session($sessionID);
197
198
    # We have just logged in
199
    # If we are not coming from the login form we empty the credential to reject the access
200
    if ( !$session && $user ) {
201
        if ( $in->{query}->param('op') ne 'cud-login' ) {
202
            $in->{query}->param('userid', '');
203
            $in->{query}->param('password', '');
204
        }
205
    }
196
206
197
    # If we enforce GDPR and the user did not consent, redirect
207
    # If we enforce GDPR and the user did not consent, redirect
198
    # Exceptions for consent page itself and SCI/SCO system
208
    # Exceptions for consent page itself and SCI/SCO system
Lines 213-223 sub get_template_and_user { Link Here
213
223
214
    if ( $in->{type} eq 'opac' && $user ) {
224
    if ( $in->{type} eq 'opac' && $user ) {
215
        my $is_sco_user;
225
        my $is_sco_user;
216
        if ($sessionID){
226
        if ($session){
217
            my $session = get_session($sessionID);
227
            $is_sco_user = $session->param('sco_user');
218
            if ($session){
219
                $is_sco_user = $session->param('sco_user');
220
            }
221
        }
228
        }
222
        my $kick_out;
229
        my $kick_out;
223
230
Lines 537-544 sub get_template_and_user { Link Here
537
                or $pagename =~ /^addbybiblionumber$/
544
                or $pagename =~ /^addbybiblionumber$/
538
                or $pagename =~ /^review$/ )
545
                or $pagename =~ /^review$/ )
539
            {
546
            {
540
                my $sessionSearch = get_session( $sessionID );
547
                $session->clear( ["busc"] ) if $session;
541
                $sessionSearch->clear( ["busc"] ) if $sessionSearch;
542
            }
548
            }
543
        }
549
        }
544
550
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/auth.tt (+1 lines)
Lines 124-129 Link Here
124
124
125
    <form action="[% script_name | html %]" method="post" name="loginform" id="loginform" class="validated">
125
    <form action="[% script_name | html %]" method="post" name="loginform" id="loginform" class="validated">
126
        [% INCLUDE 'csrf-token.inc' %]
126
        [% INCLUDE 'csrf-token.inc' %]
127
        <input type="hidden" name="op" value="cud-login" />
127
        <input type="hidden" name="koha_login_context" value="intranet" />
128
        <input type="hidden" name="koha_login_context" value="intranet" />
128
    [% FOREACH INPUT IN INPUTS %]
129
    [% FOREACH INPUT IN INPUTS %]
129
        <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
130
        <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]" />
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc (+1 lines)
Lines 434-439 Link Here
434
                                    <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" autocomplete="off" />
434
                                    <label for="muserid">Login:</label><input type="text" id="muserid" name="userid" autocomplete="off" />
435
                                    <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" autocomplete="off" />
435
                                    <label for="mpassword">Password:</label><input type="password" id="mpassword" name="password" autocomplete="off" />
436
                                    <fieldset class="action">
436
                                    <fieldset class="action">
437
                                        <input type="hidden" name="op" value="cud-login" />
437
                                        <input type="submit" class="btn btn-primary" value="Log in" />
438
                                        <input type="submit" class="btn btn-primary" value="Log in" />
438
                                    </fieldset>
439
                                    </fieldset>
439
                                </div>
440
                                </div>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt (-1 / +1 lines)
Lines 203-208 Link Here
203
                                            <label for="password">Password:</label>
203
                                            <label for="password">Password:</label>
204
                                            <input class="form-control" type="password" id="password" name="password" autocomplete="off" />
204
                                            <input class="form-control" type="password" id="password" name="password" autocomplete="off" />
205
                                            <fieldset class="action">
205
                                            <fieldset class="action">
206
                                                <input type="hidden" name="op" value="cud-login" />
206
                                                <input type="submit" value="Log in" class="btn btn-primary" />
207
                                                <input type="submit" value="Log in" class="btn btn-primary" />
207
                                            </fieldset>
208
                                            </fieldset>
208
                                        </div>
209
                                        </div>
209
- 

Return to bug 36084