From a01018b9b682af7d25d8c856a9522809293b49c7 Mon Sep 17 00:00:00 2001 From: yubiuser Date: Sun, 22 Sep 2024 22:42:21 +0200 Subject: [PATCH] Fix atob issue when xff is undefined Signed-off-by: yubiuser --- scripts/pi-hole/js/footer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/footer.js b/scripts/pi-hole/js/footer.js index 440a1054..d5e7b684 100644 --- a/scripts/pi-hole/js/footer.js +++ b/scripts/pi-hole/js/footer.js @@ -714,7 +714,7 @@ function addAdvancedInfo() { const advancedInfoTarget = $("#advanced-info"); const isTLS = advancedInfoSource.data("tls"); const clientIP = advancedInfoSource.data("client-ip"); - const XForwardedFor = window.atob(advancedInfoSource.data("xff")); + const XForwardedFor = window.atob(advancedInfoSource.data("xff") ?? ""); const starttime = parseFloat(advancedInfoSource.data("starttime")); const endtime = parseFloat(advancedInfoSource.data("endtime")); const totaltime = 1e3 * (endtime - starttime);