mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Vuln dashboard: Update moment dependency to resolve code scanning alerts (#17849)
Related to: #17764 Changes: - Updated ee/vulnerability-dashboard/assets/dependencies/moment.js to resolve two code scanning alerts.
This commit is contained in:
parent
3d46b0d22a
commit
da32121f00
@ -680,7 +680,7 @@ function getParseRegexForToken (token, config) {
|
|||||||
|
|
||||||
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
|
||||||
function unescapeFormat(s) {
|
function unescapeFormat(s) {
|
||||||
return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
|
return regexEscape(s.replace(/\\/g, '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
|
||||||
return p1 || p2 || p3 || p4;
|
return p1 || p2 || p3 || p4;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@ -1477,9 +1477,9 @@ function localeWeekdaysParse (weekdayName, format, strict) {
|
|||||||
|
|
||||||
mom = createUTC([2000, 1]).day(i);
|
mom = createUTC([2000, 1]).day(i);
|
||||||
if (strict && !this._fullWeekdaysParse[i]) {
|
if (strict && !this._fullWeekdaysParse[i]) {
|
||||||
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
|
this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i');
|
||||||
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
|
this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i');
|
||||||
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
|
this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i');
|
||||||
}
|
}
|
||||||
if (!this._weekdaysParse[i]) {
|
if (!this._weekdaysParse[i]) {
|
||||||
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
|
regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
|
||||||
|
Loading…
Reference in New Issue
Block a user