ether/etherpad-lite — pull request #2404 by webzwo0i (2014-12-27 17:13:35+00:00)
Title: block changeset if it deletes more lines than exist in the whole pad

This was part of an old pull request but I reverted the part that probably caused trouble and will issue a new pull requests for them.
I could not get backend-tests in JS to run for this, but I have a script in ruby that triggers the bug https://github.com/webzwo0i/ep-debug-helper/blob/master/checkrep-delete-more-lines-than-exist.rb Also, because of the recent socket.io update I only could test against 1.4.1 (but in the develop branch with my patch applied the frontend-tests run), so if you could show my how I can have control about sending specific changesets in node it would be awesome.
It composes a changeset that deletes all characters, e.g. for a default pad: Z:6c<6b|6-6c but with the line count replaced by a higher value, e.g. Z:6c<6b|30-6c
Without this patch clients would disconnect with "TypeError: entryToDelete is null" in ace2_inner.js