From 097ba9bc9e6bd851246b50c6ebe092d1325da17d Mon Sep 17 00:00:00 2001 From: "Laurent Destailleur (aka Eldy)" Date: Thu, 13 Feb 2025 17:44:36 +0100 Subject: [PATCH] Clean code --- htdocs/public/payment/newpayment.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index bd8f5f0ac6d..a3cedb24887 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -112,7 +112,7 @@ if (!GETPOST("currency", 'alpha')) { } $source = GETPOST("s", 'aZ09') ? GETPOST("s", 'aZ09') : GETPOST("source", 'aZ09'); $getpostlang = GETPOST('lang', 'aZ09'); -$ws = GETPOST("ws"); // Website reference where the newpayment page is embedded +$ws = GETPOST("ws", "aZ09"); // Website reference where the newpayment page is embedded if (!$action) { @@ -132,7 +132,7 @@ if (!$action) { $thirdparty = null; // Init for static analysis -$istrpecu = null; // Init for static analysis +$stripecu = null; // Init for static analysis $paymentintent = null; // Init for static analysis // Load data required later for actions and view @@ -965,9 +965,9 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb // Output html code for logo if ($ws) { // Look for a personalized header file (htmlheaderpayment.html) if the payment system is called from a website - $filehtmlheader = dol_osencode(DOL_DATA_ROOT . ($conf->entity > 1 ? '/' . $conf->entity : '') . '/website/' . $ws . '/htmlheaderpayment.html'); - if (is_file($filehtmlheader)) { - print file_get_contents($filehtmlheader); + $filehtmlheader = dol_sanitizePathName(DOL_DATA_ROOT . ($conf->entity > 1 ? '/' . $conf->entity : '') . '/website/' . $ws . '/htmlheaderpayment.html'); + if (dol_is_file($filehtmlheader)) { + print file_get_contents(dol_osencode($filehtmlheader)); } }