Page MenuHomePhabricator

Address unsafe regular expression in checkuser/cidr.js
Closed, ResolvedPublic

Description

The mwgate-node16-docker job is raising the following warning:

21:10:37 /src/modules/ext.checkUser/checkuser/cidr.js
21:10:37   61:29  warning  Unsafe Regular Expression  security/detect-unsafe-regex

The regex that this is related to is https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/CheckUser/+/refs/heads/master/modules/ext.checkUser/cidr/cidr.js#90

Ideally this regex should be fixed.

Event Timeline

Dreamy_Jazz updated the task description. (Show Details)

Change 976879 had a related patch set uploaded (by DatGuy; author: DatGuy):

[mediawiki/extensions/CheckUser@master] CIDRCalculator: replace unsafe regex with split()

https://gerrit.wikimedia.org/r/976879

Change 976879 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] CIDRCalculator: replace unsafe regex with split()

https://gerrit.wikimedia.org/r/976879