Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion static/plugins/chart.js/Chart.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -16550,11 +16550,17 @@ var moment = createCommonjsModule(function (module, exports) {
return globalLocale;
}

function isLocaleNameSane(name) {
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
return name.match('^[^/\\\\]*$') != null;
}

function loadLocale(name) {
var oldLocale = null;
// TODO: Find a better way to register and load all the locales in Node
if (!locales[name] && ('object' !== 'undefined') &&
module && module.exports) {
module && module.exports &&
isLocaleNameSane(name)) {
try {
oldLocale = globalLocale._abbr;
var aliasedRequire = commonjsRequire;
Expand Down