From 0545cba708080afc0f991f1051a4d47b93231257 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 29 Nov 2017 11:57:37 +0000 Subject: [PATCH] captive: Escape any special characters in title on PDF vouchers Signed-off-by: Michael Tremer --- config/rootfiles/core/117/filelists/files | 1 + html/cgi-bin/captive.cgi | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/core/117/filelists/files b/config/rootfiles/core/117/filelists/files index eafb9f1a76..88473a46ac 100644 --- a/config/rootfiles/core/117/filelists/files +++ b/config/rootfiles/core/117/filelists/files @@ -5,6 +5,7 @@ etc/rc.d/init.d/apache etc/ssl/certs/ca-bundle.crt etc/ssl/certs/ca-bundle.trust.crt opt/pakfire/lib/functions.pl +srv/web/ipfire/cgi-bin/captive.cgi srv/web/ipfire/cgi-bin/country.cgi srv/web/ipfire/cgi-bin/logs.cgi/config.dat srv/web/ipfire/cgi-bin/logs.cgi/firewalllog.dat diff --git a/html/cgi-bin/captive.cgi b/html/cgi-bin/captive.cgi index 113c29f412..f3bb28cb22 100755 --- a/html/cgi-bin/captive.cgi +++ b/html/cgi-bin/captive.cgi @@ -757,7 +757,7 @@ sub generate_pdf() { $f_subheadline->translate($cx, ($y + $h - $cy) / 2.4 + $cy); if ($settings{'TITLE'}) { - $f_headline->text_center($settings{'TITLE'}); + $f_headline->text_center(decode("utf8", $settings{'TITLE'})); $f_subheadline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'})); } else { $f_headline->text_center(decode("utf8", $Lang::tr{'Captive WiFi coupon'})); -- 2.39.2