From 7764faebb5e5c4b765ca7b8e0530121298b2d808 Mon Sep 17 00:00:00 2001 From: Peca Nesovanovic <59750439+Npeca75@users.noreply.github.com> Date: Sat, 23 Apr 2022 15:33:36 +0200 Subject: [PATCH] use builtin "safename" (#13945) --- LibreNMS/Data/Store/Rrd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreNMS/Data/Store/Rrd.php b/LibreNMS/Data/Store/Rrd.php index e89bc7da6d..b732fffb19 100644 --- a/LibreNMS/Data/Store/Rrd.php +++ b/LibreNMS/Data/Store/Rrd.php @@ -460,7 +460,7 @@ class Rrd extends BaseDatastore public function getRrdFiles($device) { if ($this->rrdcached) { - $filename = sprintf('/%s', $device['hostname']); + $filename = sprintf('/%s', self::safename($device['hostname'])); $rrd_files = $this->command('list', $filename, ''); // Command output is an array, create new array with each filename as a item in array. $rrd_files_array = explode("\n", trim($rrd_files[0]));