Bug 14121: Silence warnings t/db_dependent/Auth_with_cas.t
TEST PLAN --------- 1) $ prove t/db_dependent/Auth_with_cas.t -- CGI security warning 2) apply patch 3) $ prove t/db_dependent/Auth_with_cas.t -- no noise. 4) koha qa test tools Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Not able to reproduce the error on my setup, but the code is a clear improvement over the previous version. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
This commit is contained in:
parent
e799e1cbc3
commit
588f13e699
2 changed files with 6 additions and 4 deletions
|
@ -208,13 +208,14 @@ sub _url_with_get_params {
|
|||
C4::Context->preference('staffClientBaseURL');
|
||||
|
||||
my $uri_params_part = '';
|
||||
foreach ( $query->url_param() ) {
|
||||
foreach my $param ( $query->url_param() ) {
|
||||
# url_param() always returns parameters that were deleted by delete()
|
||||
# This additional check ensure that parameter was not deleted.
|
||||
if ($query->param($_)) {
|
||||
my $uriPiece = $query->param($param);
|
||||
if ($uriPiece) {
|
||||
$uri_params_part .= '&' if $uri_params_part;
|
||||
$uri_params_part .= $_ . '=';
|
||||
$uri_params_part .= URI::Escape::uri_escape( $query->param($_) );
|
||||
$uri_params_part .= $param . '=';
|
||||
$uri_params_part .= URI::Escape::uri_escape( $uriPiece );
|
||||
}
|
||||
}
|
||||
$uri_base_part .= '?' if $uri_params_part;
|
||||
|
|
|
@ -38,6 +38,7 @@ my $dbh = C4::Context->dbh;
|
|||
$dbh->{ AutoCommit } = 0;
|
||||
$dbh->{ RaiseError } = 1;
|
||||
|
||||
C4::Context->disable_syspref_cache();
|
||||
C4::Context->set_preference('OPACBaseURL','http://localhost');
|
||||
C4::Context->set_preference('staffClientBaseURL','localhost:8080');
|
||||
|
||||
|
|
Loading…
Reference in a new issue