hocuspocus
hocuspocus copied to clipboard
Document name can be URL encoded
I am not sure if it is bug or a feature... but I think document name should be URL decoded just in case. If user use some unsafe characters in document name, they are auto encoded in URL and they are used as the document name on server.
Some of those characters I tried are: space { } < > | ^. Surprisingly % was ok. You could argue these are very weird chars to have in document name though but I had them and that's how I found out.
https://github.com/ueberdosis/hocuspocus/blob/218143bfd01ffc23f5bca17cd4f8fe80d6bd7dfb/packages/server/src/Hocuspocus.ts#L351
Oh, yes! I’ve decoded the document names (and added a test for it). Thanks for the report!