otterwiki icon indicating copy to clipboard operation
otterwiki copied to clipboard

500 Internal Server Error when checking history of sub page with quotation marks

Open twied opened this issue 8 months ago • 5 comments

  • create new otterwiki instance: $ podman run -p 8080:80 docker.io/redimp/otterwiki:2

  • create page with a title that has spaces and quotes, e.g. foo "bar"/baz.

  • go to changelog http://localhost:8080/-/changelog page and click on the just created revision (http://localhost:8080/-/commit/e196d9)

  • Get 500 Internal Server Error

twied avatar Apr 26 '25 15:04 twied

Hey @twied, thanks for reporting this.

Behind the 500 was a unidiff.errors.UnidiffParseError raised.

unidiff.errors.UnidiffParseError: Target without source: +++ "b/foo \"bar\"/baz.md"	

Looking into it!

redimp avatar Apr 26 '25 17:04 redimp

This is a bug in python-unidiff, whis has been reported and half fixed https://github.com/matiasb/python-unidiff/commit/2771a878f7bc6619e625feb4dbad3427f57f5237 but never made it into a release: https://github.com/matiasb/python-unidiff/issues/113.

redimp avatar Apr 26 '25 18:04 redimp

I wrapped up a workaround, would appreciate further testing here: https://testing.otterwiki.com/Issues/%22Quote%22%20In%20Filename%20Issue%20244.

Note: Like demo.otterwiki.com this site will reset after some time, please share anything you run into here in the ticket. Thanks!

redimp avatar Apr 27 '25 19:04 redimp

lgtm, thank you! 👍

twied avatar Apr 28 '25 08:04 twied

Thanks for testing! You came up with way more stuff as I thought of .. like just " as pagename. 😅

Will make a new release with these fixes later today.

redimp avatar Apr 28 '25 10:04 redimp

Released in v2.10.6.

redimp avatar Apr 28 '25 22:04 redimp