From e4e5cce7b77c8ec57e318a2551f67aa0b72ce329 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 26 Feb 2020 11:28:30 +0100 Subject: [PATCH] Bug 4461: Use our local_referer instead of HTTP_REFERER Cannot remember why exactly, but it seems that we should not use HTTP_REFERER directly. Signed-off-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Jonathan Druart --- opac/opac-reportproblem.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/opac/opac-reportproblem.pl b/opac/opac-reportproblem.pl index a6795c10eb..9934ccc6b8 100644 --- a/opac/opac-reportproblem.pl +++ b/opac/opac-reportproblem.pl @@ -27,6 +27,7 @@ use Koha::ProblemReport; use Koha::DateUtils; use Koha::Libraries; use Koha::Patrons; +use Koha::Util::Navigation; my $input = new CGI; @@ -43,7 +44,8 @@ if ( !C4::Context->preference('OPACReportProblem') ){ print $input->redirect("/cgi-bin/koha/errors/404.pl"); } -my $problempage = $ENV{HTTP_REFERER}; +my $problempage = C4::Context->preference('OPACBaseURL') . Koha::Util::Navigation::local_referer($input ); + my $member = Koha::Patrons->find($borrowernumber); my $username = $member->userid; my $branchcode = $member->branchcode; -- 2.20.1