John McLear
5855e3d5bf
weird styling
2013-04-02 23:17:25 +01:00
John McLear
57a9ccbb88
whoops, comments hurt
2013-04-02 23:16:28 +01:00
John McLear
9e523191ea
whoops padid should be in payload..
2013-04-02 23:15:16 +01:00
John McLear
a9bd081a44
more clean up
2013-03-19 16:55:42 +00:00
John McLear
9bb0587447
working and jsonify obj
2013-03-19 16:40:51 +00:00
John McLear
2916b39c24
make sure the sessionID target is right
2013-03-19 16:21:04 +00:00
John McLear
d0e656d0a6
Merge branch 'develop' of github.com:ether/etherpad-lite into custom-obj-msg
2013-03-19 13:59:07 +00:00
John McLear
13ad46aa67
a safer approach I think but still be careful
2013-03-16 13:19:12 +00:00
Marcel Klehr
de552df6db
Fix clearing authorship colors which was broken by #1609
...
Fixes #1620
2013-03-15 18:08:51 +01:00
John McLear
ac9b972358
Merge branch 'develop' of github.com:ether/etherpad-lite into custom-obj-msg
2013-03-14 12:01:09 -03:00
Marcel Klehr
c30b0b72b8
Validate all 'author' attribs of incoming changesets to be the same value as the current user's authorId
2013-03-13 22:23:35 +01:00
John McLear
83a820b720
new function for handling custom messages, allows objects to be sent, before we only allowed strings
2013-03-12 16:59:15 +00:00
Jordan Hollinger
3cafa24982
Fix variable name typo in PadMessageHandler.padUsers
2013-03-07 09:37:03 -05:00
John McLear
ebd8b85072
patch documented here https://github.com/ether/etherpad-lite/issues/472 adds some stability but not a perfect solution
2013-02-27 16:17:50 +00:00
John McLear
18b6cf1534
Merge pull request #1523 from ether/store-sessions-in-db
...
Store sessions in db
2013-02-26 18:03:54 -08:00
John McLear
fb3e4a6232
only show clients on this pad resolves issue #1544
2013-02-20 16:10:27 +00:00
John McLear
e52dc2b17c
dont reset head count, use the one we should :)
2013-02-19 02:05:51 +00:00
John McLear
eeeeb04840
remove cruft
2013-02-18 00:37:47 +00:00
John McLear
6e46a53288
this is probably bad, please sanity check
2013-02-18 00:36:31 +00:00
John McLear
11a8295150
eureka
2013-02-18 00:29:53 +00:00
Mark Fisher
500f9b8b48
Fixed typo thats made server hang
2013-02-13 15:25:27 +00:00
Manuel Knitza
b1586684c8
Explicitly log creation of pad
2013-02-11 03:03:18 +01:00
Marcel Klehr
6d2b1488d6
Reformat access log messages to improve readability
2013-02-10 16:14:48 +01:00
Marcel Klehr
ee89696c4d
Log the client ip on pad access with logger 'access'
...
also, don't log every message with log level info!
2013-02-10 16:03:49 +01:00
mluto
f2cd9e3adc
Removed sidebar-code since the sidebar got removed in EPL, there is only the stickychat which is not affected by this.
2013-02-08 22:06:28 +01:00
mluto
e6454af5ed
Removed fullWidth/resizing-code as the pad is always fullscreen, unlike the old EP
2013-02-08 22:00:17 +01:00
mluto
0d5b98a338
Removed isProPad, since all pads are public except for group-pads
2013-02-07 14:30:09 +01:00
Dmitry
34f9f15150
socket.io rooms instead of own session management
...
Replaces homegrown pad session management with socket.io build-in rooms
2013-02-05 23:33:44 +04:00
John McLear
1814c756ad
Merge pull request #1431 from mluto/fix-userinfo-crash
...
Fix USERINFO_UPDATE crash
2013-01-30 06:43:37 -08:00
mluto
7e48e025c7
Check for missing payload on CLIENT_MESSAGE
2013-01-30 15:28:54 +01:00
mluto
f2742c5b63
Check for missing userInfo
2013-01-30 15:21:25 +01:00
John McLear
edd8b12049
push authorID to author object and return via api...
2013-01-29 16:45:09 +00:00
Peter 'Pita' Martischka
07a267be7a
Added colors to pad diff
2013-01-27 16:45:09 +00:00
mluto
41cb5d8265
Added hook for clientVars and hook-doc
2013-01-14 22:51:26 +01:00
mluto
94f9b05c4c
Only create clientVars when they are needed
2013-01-14 22:08:33 +01:00
mluto
bc05f9eb0a
converted load-more-link to button, added loading-gif, fixed typo
2013-01-07 19:15:55 +01:00
mluto
5592c4b0fe
client loads messages using the new client loads messages using new method, getChatMessages restructured and renamed to getLastChatMessages, added GET_CHAT_MESSAGES, getChatMessages restructured and renamed to getLastChatMessages
2013-01-06 16:11:48 +01:00
mluto
9484b92ae2
fixed and unified indenting, added comments in handleClientReady
2013-01-06 14:55:33 +01:00
Marcel Klehr
e24ed46a08
PadMessageHandler: Make sure sessioninfos[session] still exists before pushing data to user.
2012-11-10 10:47:12 +01:00
John McLear
d7ec050f34
Merge pull request #1035 from amtep/develop
...
Guard against malicious clients in USERINFO_UPDATE handling
2012-10-11 08:27:27 -07:00
Dmitry
dbcdc2f956
fix for error handling in callback code
...
The callback code does not follow error handling guidelines, thus always
receiving NULL instead of results array.
2012-10-11 18:07:45 +04:00
Dmitry
0fa954c1a0
fixed variable name in handleMessageHook
...
the code would never work as expected with this type
2012-10-11 17:51:57 +04:00
Richard Braakman
85b44119ae
USERINFO_UPDATE: construct a new message for broadcast
...
The server was reusing the client's message when broadcasting userinfo
updates. This would allow a malicious client to insert arbitrary fields
into a message that the other clients would trust as coming from the
server. For example, adding "disconnect" or renaming other authors.
This commit fixes it by having the server construct a new message with
known fields before broadcasting.
2012-10-02 23:27:30 +03:00
Richard Braakman
2e72a1e489
Prevent server crash in handleClientReady
...
The client might have disconnected between callbacks so don't try to
write to the session before checking this. The main callback of this
function now has a single check at its top.
Removed a redundant check halfway through the callback.
Also normalized use of client.id for the session index instead of a mix of
client.id and sessionId.
Added some explanatory comments.
2012-09-28 23:23:00 +03:00
Richard Braakman
413ddb393e
Add some explanatory comments to handleUserChanges()
2012-09-28 22:49:20 +03:00
Richard Braakman
7aaef01346
Prettify session handling in handleUserChanges
...
Also add a comment to explain what's going on with thisSession.
No changes in behavior.
2012-09-27 23:07:00 +03:00
Richard Braakman
f1b4206cad
Fix crash when client submits changeset based on too-old revision
...
We had a problem with the server running out of stack space if a client
submitted a changeset based on a revision more than about 1000 revs old.
(944 was our cutoff but yours may vary). This happened in the wild with
about 30 people editing via flaky wifi. A disconnected client would try
to submit a fairly old changeset when reconnecting, and a few minutes
was enough for 30 people to generate that many revs.
The stack kept growing because pad.getRevisionChangeset was being answered
from the cache, so no I/O interrupted the callback chain. (This was seen with
mysql, I don't know about other backends.)
This patch forces a nextTick every 200 revisions to solve this problem.
2012-09-26 03:01:59 +03:00
Richard Braakman
e16008b371
Fix sessioninfos race that can cause crash during USER_CHANGES handling
...
When stress testing etherpad-lite we occasionally got this error:
TypeError: Cannot read property 'author' of undefined
at /home/etherpad/etherpad-lite/src/node/handler/PadMessageHandler.js:556:47
handleUserChanges was accessing sessioninfos[client.id].author in a callback,
after spending some time in the loop that updates the changeset to the
latest revision. It's possible for a disconnect request to be processed
during that loop so the session might no longer be there.
This patch fixes it by looking up the author at the start of the function.
2012-09-26 03:01:59 +03:00
Mark Holmquist
f9469ef256
Add in padUsers HTTP API call
...
I needed the list of users this time, so I got it. There are docs
and everything.
2012-08-17 13:39:16 -07:00
Mark Holmquist
3d4fb81796
Add in an HTTP API call to send a custom message type.
...
You cannot currently send any data with your custom message, but
this patch is just begging for a second one that will allow that.
2012-08-08 10:12:11 -07:00