Disallowing non-alphanumeric usernames
This commit is contained in:
@ -90,11 +90,12 @@ const PusherMiddleware = (function(){
|
||||
|
||||
var state = store.getState();
|
||||
var connection = {
|
||||
clientid: Math.random().toString(36).substr(2, 9),
|
||||
clientid: helpers.generateGuid(),
|
||||
connectionid: helpers.generateGuid(),
|
||||
username: Math.random().toString(36).substr(2, 9)
|
||||
username: 'Anonymous'
|
||||
}
|
||||
if( state.pusher.username ) connection.username = state.pusher.username;
|
||||
connection.username = connection.username.replace(/\W/g, '')
|
||||
|
||||
socket = new WebSocket(
|
||||
'ws://'+state.mopidy.host+':'+state.mopidy.port+'/iris/ws',
|
||||
|
||||
Reference in New Issue
Block a user