mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Merge branch 'develop' of github.com:ether/etherpad-lite into custom-obj-msg
This commit is contained in:
commit
ac9b972358
24 changed files with 271 additions and 96 deletions
|
@ -567,11 +567,16 @@ function handleUserChanges(client, message)
|
|||
throw "Attribute pool is missing attribute "+n+" for changeset "+changeset;
|
||||
}
|
||||
});
|
||||
|
||||
// Validate all 'author' attribs to be the same value as the current user
|
||||
wireApool.eachAttrib(function(type, value) {
|
||||
if('author' == type && value != thisSession.author) throw "Trying to submit changes as another author"
|
||||
})
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
// There is an error in this changeset, so just refuse it
|
||||
console.warn("Can't apply USER_CHANGES "+changeset+", because it failed checkRep");
|
||||
console.warn("Can't apply USER_CHANGES "+changeset+", because: "+e);
|
||||
client.json.send({disconnect:"badChangeset"});
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue