Merge pull request #1923 from ether/fix/filter-historicalAuthorData

filter historical author data
This commit is contained in:
John McLear 2013-10-07 10:20:01 -07:00
commit 7663b2ec49
1 changed files with 1 additions and 6 deletions

View File

@ -953,8 +953,7 @@ function handleClientReady(client, message)
authorManager.getAuthor(authorId, function(err, author) authorManager.getAuthor(authorId, function(err, author)
{ {
if(ERR(err, callback)) return; if(ERR(err, callback)) return;
delete author.timestamp; historicalAuthorData[authorId] = {name: author.name, colorId: author.colorId}; // Filter author attribs (e.g. don't send author's pads to all clients)
historicalAuthorData[authorId] = author;
callback(); callback();
}); });
}, callback); }, callback);
@ -1016,10 +1015,6 @@ function handleClientReady(client, message)
// Warning: never ever send padIds.padId to the client. If the // Warning: never ever send padIds.padId to the client. If the
// client is read only you would open a security hole 1 swedish // client is read only you would open a security hole 1 swedish
// mile wide... // mile wide...
// Heh, turns out we already did when we sent historicalAuthorData so
// if it's a readonly pad request don't send the pad IDs of the author
if(sessioninfos[client.id].readonly) historicalAuthorData = {};
var clientVars = { var clientVars = {
"accountPrivs": { "accountPrivs": {
"maxRevisions": 100 "maxRevisions": 100