From 4bffe048c114b4e11f527f05ddbbd7bbee294210 Mon Sep 17 00:00:00 2001 From: Mark Kornblum Date: Wed, 30 Nov 2016 15:28:25 -0800 Subject: Don't allow path seperators in generated filenames --- lib/system.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/system.js b/lib/system.js index 60a55246..9ef713c8 100644 --- a/lib/system.js +++ b/lib/system.js @@ -19,6 +19,7 @@ function System (faker) { str = str.replace(/\,/g, '_'); str = str.replace(/\-/g, '_'); str = str.replace(/\\/g, '_'); + str = str.replace(/\//g, '_'); str = str.toLowerCase(); return str; }; @@ -36,6 +37,7 @@ function System (faker) { str = str.replace(/\,/g, '_'); str = str.replace(/\-/g, '_'); str = str.replace(/\\/g, '_'); + str = str.replace(/\//g, '_'); str = str.toLowerCase(); return str; }; @@ -155,4 +157,4 @@ function System (faker) { } -module['exports'] = System; \ No newline at end of file +module['exports'] = System; -- cgit v1.2.3