yjs / y-websocket

Websocket Connector for Yjs
https://docs.yjs.dev/ecosystem/connection-provider/y-websocket
MIT License
497 stars 256 forks source link

Incorrect handling of y-protocols/auth messages #117

Closed mifopen closed 2 years ago

mifopen commented 2 years ago

Describe the bug readAuthMessage passes Y.Doc instance to permissionDeniedHandler (or whatever you gave it as the second argument) But permissionDeniedHandler in y-websocket.js thinks it will be a provider https://github.com/yjs/y-websocket/blob/master/src/y-websocket.js#L62

To Reproduce Steps to reproduce the behavior:

  1. Send auth message from server
  2. See Permission denied to access undefined in logs

Expected behavior See Permission denied to access <URL> or smth in logs

Huly®: YJS-528

dmonad commented 2 years ago

Thanks, I fixed this. This will be included in the next release.