Fix bug in whitelist checking, fix #96
Because we used indexOf to check if a user is on the whitelist, users whose usernames are substrings of usernames already on the list are also allowed.
This commit is contained in:
parent
837efdb386
commit
2a8780369d
@ -102,7 +102,7 @@
|
||||
whitelist = new AFCH.Page( AFCH.consts.whitelistTitle );
|
||||
whitelist.getText().done( function ( text ) {
|
||||
var $howToDisable,
|
||||
userAllowed = text.indexOf( user ) !== -1;
|
||||
userAllowed = ( new RegExp( '\|\s*' + user + '\s*}' ).test( text );
|
||||
|
||||
if ( !userAllowed ) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user