jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
140 stars 29 forks source link

A YRoom can be created from an un-authenticated user. #291

Open Zsailer opened 2 months ago

Zsailer commented 2 months ago

I noticed while investigating https://github.com/jupyterlab/jupyter-collaboration/issues/290 that an unauthenticated user can trigger the creation of a collaborative document, even they are blocked from connecting to it after it is created.

I believe the issue is that authentication happens in the parent class's prepare(...) method in the YDocWebSocketHandler, which is called after the room is created.

I think we need to move this call earlier in this method, probably call it first before any other logic.