aboutsummaryrefslogtreecommitdiff
path: root/lib/system.js
diff options
context:
space:
mode:
authorMark Kornblum <[email protected]>2016-11-30 15:28:25 -0800
committerMark Kornblum <[email protected]>2016-11-30 15:30:14 -0800
commit4bffe048c114b4e11f527f05ddbbd7bbee294210 (patch)
tree018a0da5e88b9777bf78e8af0e2e2ecf074bf3f0 /lib/system.js
parent7e96b93869b422af5a63c115e04ff0206bf7b228 (diff)
downloadfaker-4bffe048c114b4e11f527f05ddbbd7bbee294210.tar.xz
faker-4bffe048c114b4e11f527f05ddbbd7bbee294210.zip
Don't allow path seperators in generated filenames
Diffstat (limited to 'lib/system.js')
-rw-r--r--lib/system.js4
1 files changed, 3 insertions, 1 deletions
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;