Do content checks on the drive so if it gets corrupted, the patch will be rejected
This commit is contained in:
@@ -297,6 +297,15 @@ define([
|
||||
crypto: Crypto.createEncryptor(secret.keys),
|
||||
userName: 'fs',
|
||||
logLevel: 1,
|
||||
validateContent: function (content) {
|
||||
try {
|
||||
JSON.parse(content);
|
||||
return true;
|
||||
} catch (e) {
|
||||
console.error("Failed to parse, rejecting patch");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var exp = {};
|
||||
|
||||
Reference in New Issue
Block a user