From 7754fa01fbd01d67f8b7a0209e3064d3d47a0ca7 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Thu, 6 May 2021 12:17:02 +0200 Subject: [PATCH] Update centToFloat.ctp An additional security patch. --- community_server/src/Template/Element/centToFloat.ctp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/community_server/src/Template/Element/centToFloat.ctp b/community_server/src/Template/Element/centToFloat.ctp index 40e3c4754..2fade18b2 100644 --- a/community_server/src/Template/Element/centToFloat.ctp +++ b/community_server/src/Template/Element/centToFloat.ctp @@ -11,5 +11,8 @@ $transformAmount = $cent; if($cut_places > 0) { $transformAmount = floor($cent / pow(10, $cut_places)); } +if($cut_places < 0) { + $cut_places = 0; +} echo $transformAmount / pow(10, $precision - $cut_places);