Ipfs-companion: Words found that violate the Mozilla conditions of use

Created on 5 Feb 2018  路  10Comments  路  Source: ipfs/ipfs-companion

Seems that we have some F-bombs in source that trigger linter notices 馃樃

MOZILLA_COND_OF_USE   Violation of Mozilla conditions of use.   Words found that violate the Mozilla conditions of use. See                            dist/ipfs-companion-common.js                              
                                                                https://www.mozilla.org/en-US/about/legal/acceptable-use/ for more details.                                                                       
MOZILLA_COND_OF_USE   Violation of Mozilla conditions of use.   Words found that violate the Mozilla conditions of use. See                            dist/contentScripts/ipfs-proxy/page.js                     
                                                                https://www.mozilla.org/en-US/about/legal/acceptable-use/ for more details.
kinbug help wanted good first issue exnovice arefirefox

Most helpful comment

Fuck and queer are badwords? :S That's pretty bad. I took the liberty to file mozilla/addons-linter#1851.

All 10 comments

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' ]

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

Was this page helpful?
0 / 5 - 0 ratings