mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Merge branch 'develop' of github.com:ether/etherpad-lite into custom-obj-msg
This commit is contained in:
commit
d0e656d0a6
39 changed files with 287 additions and 177 deletions
|
@ -569,10 +569,19 @@ function handleUserChanges(client, message)
|
|||
}
|
||||
});
|
||||
|
||||
// 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"
|
||||
})
|
||||
// Validate all added 'author' attribs to be the same value as the current user
|
||||
var iterator = Changeset.opIterator(Changeset.unpack(changeset).ops)
|
||||
, op
|
||||
while(iterator.hasNext()) {
|
||||
op = iterator.next()
|
||||
if(op.opcode != '+') continue;
|
||||
op.attribs.split('*').forEach(function(attr) {
|
||||
if(!attr) return
|
||||
attr = wireApool.getAttrib(attr)
|
||||
if(!attr) return
|
||||
if('author' == attr[0] && attr[1] != thisSession.author) throw "Trying to submit changes as another author"
|
||||
})
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
|
|
|
@ -354,7 +354,6 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
// Let's put this under /rest for now
|
||||
var subpath = express();
|
||||
|
||||
args.app.use(express.bodyParser());
|
||||
args.app.use(basePath, subpath);
|
||||
|
||||
swagger.setAppHandler(subpath);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue