hocuspocus icon indicating copy to clipboard operation
hocuspocus copied to clipboard

Document name can be URL encoded

Open dkrym opened this issue 5 years ago • 1 comments

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

dkrym avatar Aug 07 '21 06:08 dkrym

Oh, yes! I’ve decoded the document names (and added a test for it). Thanks for the report!

hanspagel avatar Aug 18 '21 08:08 hanspagel