From 11a8245ca6294d34703ea4a51d8c6870589c7ebc Mon Sep 17 00:00:00 2001 From: kirrg001 Date: Thu, 14 Dec 2017 01:15:12 +0100 Subject: [PATCH] Added TODO to core/server/data/validation/index.js no issue - we are modifying the global validator dependency, which is bad - see https://github.com/chriso/validator.js/issues/525#issuecomment-213149570 - we should create our own class and expose a singleton for the whole Ghost project --- core/server/data/validation/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/server/data/validation/index.js b/core/server/data/validation/index.js index 61907d3fbf..51e91a4259 100644 --- a/core/server/data/validation/index.js +++ b/core/server/data/validation/index.js @@ -52,6 +52,7 @@ function characterOccurance(stringToTest) { } // extends has been removed in validator >= 5.0.0, need to monkey-patch it back in +// @TODO: We modify the global validator dependency here! https://github.com/chriso/validator.js/issues/525#issuecomment-213149570 validator.extend = function (name, fn) { validator[name] = function () { var args = Array.prototype.slice.call(arguments);