Closed lidel closed 5 years ago
It's likely in ipfs
or one of it's dependencies.
find-badwords.js
const Fs = require('fs')
const file = Fs.readFileSync('../../ipfs-companion-common.js', 'utf8')
const badwords = require('./badwords.json')
const BADWORDS_RE = {
en: new RegExp(`\\b(?:${badwords.en.join('|')})\\b`, 'gi'),
}
console.log('finding badwords...')
const matches = file.match(BADWORDS_RE.en)
console.log(matches)
output:
$ node find-badwords.js
finding badwords...
[ 'fucked', 'Fuck' ]
https://github.com/stevemao/left-pad/blob/32d6036ac3d352c0a8e331ad6fdd664e4fa0a620/index.js#L3
Both of these are in comments so shouldn't be a problem. We can resolve if we uglify ipfs-companion-common.js
Fuck and queer are badwords? :S That's pretty bad. I took the liberty to file mozilla/addons-linter#1851.
Moz closed the request to modify the badwords list, so we'll have to uglify ipfs-companion-common.js
Closing (uglified sensitive parts and MOZILLA_COND_OF_USE
is no longer present)
Aaaaand we are at this again:
$ yarn lint
Code Message Description File Line Column
MOZILLA_COND_OF_USE Violation of Mozilla conditions of use. Words found that violate the Mozilla conditions of use. See dist/bundles/backgroundPage.bundle.js
https://www.mozilla.org/en-US/about/legal/acceptable-use/ for more details.
$ node find-badwords.js
finding badwords...
[ 'Cum' ]
Cum
is introduced by a day name translation (tr_TR
) in https://github.com/samsonjs/strftime/blob/v0.10.0/strftime.js#L227:
shortDays:["Paz","Pzt","Sal","Çrş","Prş","Cum","Cts"]
Filled upstream issue: https://github.com/mozilla/addons-linter/issues/2553
Seems that we have some F-bombs in source that trigger linter notices 😸