sqlite-web: The switch from POST to GET for queries creates problems for queries with new lines inside the Home Assistant Addon

I noticed recently that running queries with SQLite Web that have new lines weren’t working anymore when embedded inside Home Assistant and found that it’s been a problem since 0.6.x when POST was switch to GET for queries which looks like happened in this commit: https://github.com/coleifer/sqlite-web/commit/bae45402470a53e9bf11ec1125f76ea61189b91b

There has been an issue open since October over at the home assistant addon: https://github.com/hassio-addons/addon-sqlite-web/issues/281

Is there anything to be done to resolve this inside sqlite-web, it looks like security measures inside Home Assistant don’t like encoded new line characters %0A and %0D which doesn’t appear to be easily resolvable on the Home Assistant addon side.

Is it possible to have an option to run SQL queries base64 encoded or maybe encoding new line characters some other way?

I realise it’s a bit of a stretch to ask for changes so that it embeds easier in a third party application, but I thought it was worth an ask.

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Reactions: 1
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Thank you for this change! ❤️

The HA clowns

Not sure if that was needed, adding value, or called for.

…/Frenck

PS: I wanted to compare diff between releases, however, it seems like the git tag for this release is missing.

Hi @coleifer,

I think you are probably right about it being quoted making it ok, but I thank you for walking it back anyway, because I don’t know how we’d convince them otherwise.

You’re the best! You’ll make a lot of people happy.

Pushed new version 0.6.2 with this change.

https://github.com/coleifer/sqlite-web/compare/0.6.1...0.6.2 - here’s the diff, I’d forgotten to push the tag I guess.