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

(-)a/C4/Auth.pm (-1 / +12 lines)
Lines 1209-1214 sub checkauth { Link Here
1209
            );
1209
            );
1210
        }
1210
        }
1211
1211
1212
        # In case, that this request was a login attempt, we want to prevent that users can repost the opac login
1213
        # request. We therefore redirect the user to the requested page again without the login parameters.
1214
        # See Post/Redirect/Get (PRG) design pattern: https://en.wikipedia.org/wiki/Post/Redirect/Get
1215
        if ( $type eq "opac" && $query->param('koha_login_context') && $query->param('koha_login_context') ne 'sco' && $query->param('password') && $query->param('userid') ) {
1216
            my $uri = URI->new($query->url(-relative=>1, -query_string=>1));
1217
            $uri->query_param_delete('userid');
1218
            $uri->query_param_delete('password');
1219
            $uri->query_param_delete('koha_login_context');
1220
            print $query->redirect(-uri => $uri->as_string, -cookie => $cookie, -status=>'303 See other');
1221
            exit;
1222
        }
1223
1212
        track_login_daily( $userid );
1224
        track_login_daily( $userid );
1213
1225
1214
        return ( $userid, $cookie, $sessionID, $flags );
1226
        return ( $userid, $cookie, $sessionID, $flags );
1215
- 

Return to bug 22543