Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.66k stars 44 forks source link

Folder IDs with URL-reserved characters break requests #229

Closed tschai-yim closed 8 months ago

tschai-yim commented 8 months ago

Relevant components

Environment and versions

Bug description Syncthing Tray does not escape folder IDs when making requests. I have a folder ID name+ which results in the following internal error:

Error: Unable to request folder statistics: Error transferring http://localhost:8384/rest/db/status?folder=name+ - server replied: Not Found

The + character is most likely interpreted as a space by Syncthing. Manually making the request with name%2B returns the expected result.

Steps to reproduce

  1. Register folder with ID name+
  2. Start Syncthing Tray
  3. Get notification that the request failed

Expected behavior Special characters in the folder ID get escaped and Syncthing Tray can interact with these folders.

Additional context

Martchus commented 8 months ago

Thanks for bringing that to my attention. I'll have a look at it as soon as possible. Supposedly I should also check other places where parameters are passed like this.

Martchus commented 8 months ago

Fixed on master, see commit referenced by GitHub.