mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
PadMessageHandler: Allow handleMessageSecurity
to grant one-time write access
This commit is contained in:
parent
31b025bd9d
commit
02a56dc58c
5 changed files with 94 additions and 35 deletions
|
@ -172,14 +172,14 @@ exports.connect = async (res = null) => {
|
|||
* @param {string} padId - Which pad to join.
|
||||
* @returns The CLIENT_VARS message from the server.
|
||||
*/
|
||||
exports.handshake = async (socket, padId) => {
|
||||
exports.handshake = async (socket, padId, token = 't.12345') => {
|
||||
logger.debug('sending CLIENT_READY...');
|
||||
socket.send({
|
||||
component: 'pad',
|
||||
type: 'CLIENT_READY',
|
||||
padId,
|
||||
sessionID: null,
|
||||
token: 't.12345',
|
||||
token,
|
||||
});
|
||||
logger.debug('waiting for CLIENT_VARS response...');
|
||||
const msg = await exports.waitForSocketEvent(socket, 'message');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue