From 13bb508c24b4897ead54e00355503c80ec6ad4e9 Mon Sep 17 00:00:00 2001 From: marcofaggian Date: Wed, 12 Oct 2022 11:59:26 +0200 Subject: [PATCH] fix(microsite): CWE-78, className Signed-off-by: marcofaggian --- microsite/pages/en/plugins.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/microsite/pages/en/plugins.js b/microsite/pages/en/plugins.js index ab83438ee8..91f4138174 100644 --- a/microsite/pages/en/plugins.js +++ b/microsite/pages/en/plugins.js @@ -21,12 +21,16 @@ const pluginMetadata = fs let metadata = yaml.load(fileContent); const gitIsoDate = require('child_process') - .execSync( - `git log -1 --format="%ai" --reverse ./data/plugins/${file} | cat -`, - ) + .execFileSync('git', [ + 'log', + '-1', + '--format="%ai"', + '--reverse', + `./data/plugins/${file}`, + ]) .toString(); - metadata.date = new Date(gitIsoDate) + metadata.date = new Date(gitIsoDate); return metadata; }) @@ -120,7 +124,7 @@ const Plugins = () => (
{Math.trunc((Date.now() - date) / (1000 * 60 * 60 * 24)) < newForDays && ( -
+
NEW
)}