@@ -3,13 +3,15 @@ define([ | |||||
'misc/messages', | 'misc/messages', | ||||
'security/connections', | 'security/connections', | ||||
'leaderboard/leaderboard', | 'leaderboard/leaderboard', | ||||
'config/skins' | |||||
'config/skins', | |||||
'misc/profanities' | |||||
], function( | ], function( | ||||
io, | io, | ||||
messages, | messages, | ||||
connections, | connections, | ||||
leaderboard, | leaderboard, | ||||
skins | |||||
skins, | |||||
profanities | |||||
) { | ) { | ||||
return { | return { | ||||
type: 'auth', | type: 'auth', | ||||
@@ -252,6 +254,11 @@ define([ | |||||
} | } | ||||
} | } | ||||
if (!profanities.isClean(credentials.username)) { | |||||
msg.callback(messages.login.invalid); | |||||
return; | |||||
} | |||||
io.get({ | io.get({ | ||||
ent: credentials.username, | ent: credentials.username, | ||||
field: 'login', | field: 'login', | ||||
@@ -295,6 +302,11 @@ define([ | |||||
return; | return; | ||||
} | } | ||||
if (!profanities.isClean(data.name)) { | |||||
msg.callback(messages.login.invalid); | |||||
return; | |||||
} | |||||
io.get({ | io.get({ | ||||
ent: data.name, | ent: data.name, | ||||
field: 'character', | field: 'character', | ||||
@@ -5,6 +5,7 @@ define([ | |||||
) { | ) { | ||||
return { | return { | ||||
login: { | login: { | ||||
invalid: 'invalid name chosen', | |||||
exists: 'username exists, please try another', | exists: 'username exists, please try another', | ||||
allFields: 'please complete all fields', | allFields: 'please complete all fields', | ||||
illegal: 'illegal characters in username/password', | illegal: 'illegal characters in username/password', | ||||
@@ -0,0 +1,233 @@ | |||||
define([ | |||||
], function( | |||||
) { | |||||
var config = [ | |||||
'ahole', | |||||
'anal', | |||||
'anilingus', | |||||
'anus', | |||||
'areola', | |||||
'ass', | |||||
'b1tch', | |||||
'ballsack', | |||||
'bimbo', | |||||
'bitch', | |||||
'blowjob', | |||||
'bollock', | |||||
'boner', | |||||
'boob', | |||||
'breast', | |||||
'breasts', | |||||
'bukkake', | |||||
'bullshit', | |||||
'busty', | |||||
'butt', | |||||
'cameltoe', | |||||
'carpetmuncher', | |||||
'chinc', | |||||
'chink', | |||||
'chode', | |||||
'climax', | |||||
'clit', | |||||
'cock', | |||||
'coital', | |||||
'condom', | |||||
'coon', | |||||
'crap', | |||||
'cum', | |||||
'cunilingus', | |||||
'cunnilingus', | |||||
'cunt', | |||||
'dammit', | |||||
'damn', | |||||
'dick', | |||||
'dike', | |||||
'dildo', | |||||
'dong', | |||||
'douche', | |||||
'dumbass', | |||||
'dumbasses', | |||||
'dyke', | |||||
'ejaculate', | |||||
'erection', | |||||
'erotic', | |||||
'fack', | |||||
'fag', | |||||
'fart', | |||||
'felch', | |||||
'fellate', | |||||
'fellatio', | |||||
'feltch', | |||||
'fisting', | |||||
'fondle', | |||||
'foreskin', | |||||
'fubar', | |||||
'fuck', | |||||
'fuk', | |||||
'gay', | |||||
'goatse', | |||||
'godamn', | |||||
'goddammit', | |||||
'goddamn', | |||||
'goldenshower', | |||||
'gonad', | |||||
'gspot', | |||||
'gtfo', | |||||
'handjob', | |||||
'hardon', | |||||
'hell', | |||||
'herpes', | |||||
'hitler', | |||||
'hiv', | |||||
'homo', | |||||
'hooker', | |||||
'hooter', | |||||
'horny', | |||||
'hump', | |||||
'hymen', | |||||
'incest', | |||||
'jap', | |||||
'jerkoff', | |||||
'jism', | |||||
'jiz', | |||||
'kinky', | |||||
'kkk', | |||||
'labia', | |||||
'lech', | |||||
'lesbian', | |||||
'lesbo', | |||||
'lezbian', | |||||
'lezbo', | |||||
'lube', | |||||
'masterbat', | |||||
'masturbat', | |||||
'menstruat', | |||||
'muff', | |||||
'nad', | |||||
'naked', | |||||
'nazi', | |||||
'negro', | |||||
'nigga', | |||||
'nigger', | |||||
'nipple', | |||||
'nympho', | |||||
'oral', | |||||
'orgasm', | |||||
'orgies', | |||||
'orgy', | |||||
'pantie', | |||||
'panty', | |||||
'pedo', | |||||
'pee', | |||||
'penetrat', | |||||
'penial', | |||||
'penile', | |||||
'penis', | |||||
'phalli', | |||||
'phuck', | |||||
'pimp', | |||||
'piss', | |||||
'pms', | |||||
'poon', | |||||
'porn', | |||||
'prick', | |||||
'prostitut', | |||||
'pube', | |||||
'pubic', | |||||
'pubis', | |||||
'puss', | |||||
'pussies', | |||||
'pussy', | |||||
'puto', | |||||
'queaf', | |||||
'queef', | |||||
'queer', | |||||
'rape', | |||||
'rapist', | |||||
'rectal', | |||||
'rectum', | |||||
'rectus', | |||||
'reich', | |||||
'retard', | |||||
'rimjob', | |||||
'ritard', | |||||
'rump', | |||||
'schlong', | |||||
'screw', | |||||
'scrote', | |||||
'scrotum', | |||||
'semen', | |||||
'sex', | |||||
'shit', | |||||
'skank', | |||||
'slut', | |||||
'smut', | |||||
'snatch', | |||||
'sodom', | |||||
'sperm', | |||||
'spunk', | |||||
'stfu', | |||||
'stiffy', | |||||
'strip', | |||||
'stroke', | |||||
'stupid', | |||||
'suck', | |||||
'tampon', | |||||
'tard', | |||||
'teabag', | |||||
'teat', | |||||
'teste', | |||||
'testicle', | |||||
'testis', | |||||
'thrust', | |||||
'tit', | |||||
'tramp', | |||||
'transsex', | |||||
'turd', | |||||
'tush', | |||||
'twat', | |||||
'undies', | |||||
'urinal', | |||||
'urine', | |||||
'uterus', | |||||
'vag', | |||||
'vagina', | |||||
'viagra', | |||||
'virgin', | |||||
'vomit', | |||||
'voyeur', | |||||
'vulva', | |||||
'wang', | |||||
'wank', | |||||
'weenie', | |||||
'weewee', | |||||
'weiner', | |||||
'wench', | |||||
'wetback', | |||||
'whoralicious', | |||||
'whore', | |||||
'whoring', | |||||
'wigger', | |||||
'womb', | |||||
'woody', | |||||
'wtf', | |||||
'xxx' | |||||
]; | |||||
var cLen = config.length; | |||||
return { | |||||
isClean: function(text) { | |||||
var cb = text.indexOf.bind(text); | |||||
for (var i = 0; i < cLen; i++) { | |||||
if (cb(config[i]) > -1) | |||||
return false; | |||||
} | |||||
return true; | |||||
} | |||||
}; | |||||
}); |