mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-27 17:40:06 +00:00
Escape use of commons.wikimedia.org in regular expression
Dots needs escaping resources\mmv\model\mmv.model.Repo.js 129:11 warning Unsafe Regular Expression security/detect-unsafe-regex 169:11 warning Unsafe Regular Expression security/detect-unsafe-regex The plugin does not like the backtracking for "https?", but that does not looks like a performance problem when given long strings here. Change-Id: Iac4c88b591c2e8ebb2ce037bbd99b774319a261c
This commit is contained in:
parent
5ed21318bc
commit
b4e7477150
|
@ -126,7 +126,8 @@
|
|||
* @inheritdoc
|
||||
*/
|
||||
isCommons() {
|
||||
return /^(https?:)?\/\/commons.wikimedia.org/.test( this.server );
|
||||
// eslint-disable-next-line security/detect-unsafe-regex
|
||||
return /^(https?:)?\/\/commons\.wikimedia\.org/.test( this.server );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,7 +167,8 @@
|
|||
* @inheritdoc
|
||||
*/
|
||||
isCommons() {
|
||||
return /^(https?:)?\/\/commons.wikimedia.org/.test( this.descBaseUrl );
|
||||
// eslint-disable-next-line security/detect-unsafe-regex
|
||||
return /^(https?:)?\/\/commons\.wikimedia\.org/.test( this.descBaseUrl );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue