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:
Eric 2024-03-25 18:02:27 -05:00 committed by GitHub
parent 3d46b0d22a
commit da32121f00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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, '');