Skip to content

Commit 62aaefa

Browse files
committed
Implemented poor string replacements for filtering sensitive info from module settings.
1 parent 2ccce06 commit 62aaefa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Module/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const generateModuleSettings = (mod) => {
4444
if (setting.module === mod.data.name) {
4545
// only allow scalars
4646
if (setting.config && setting.type !== "object") {
47-
const ignore = ["cookie", "password", "secret", "token", "bearer", "email"].some(badKey => setting.key.includes(badKey));
47+
let trimmedKey = setting.key.replace("-", "").replace("_", "").replace(" ", "").toLowerCase();
48+
const ignore = ["cookie", "password", "secret", "token", "bearer", "email"].some(badKey => trimmedKey.includes(badKey));
4849
if (!ignore){
4950
let setVal = game.settings.get(mod.data.name, setting.key);
5051
modSettings.push(`${setting.key}: ${setVal}`);

0 commit comments

Comments
 (0)