From fc87763e5dd98fc230df50587177208b7d0fea25 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 22 Jan 2025 15:26:30 -0500 Subject: [PATCH] Parse string -> bool without eval. --- src/layouts/payment-method/payment-method.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index c45a5c98c..38fa19611 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -429,7 +429,8 @@ export default { // prettier-ignore { const log = getQuerystringParameter(queryStrings.LOG); - if (eval(log) || !preReqResult) { + const logAsBool = (log?.toLowerCase() === "true"); + if (logAsBool || !preReqResult) { console.log("------------- payment-method.vue pagePrereqs start -----------------"); console.log(new Date() + " serviceLocationReqs::isMobile: " + isMobile); console.log(new Date() + " serviceLocationReqs::mobileReqs: " + mobileReqs);