YunoHost-Apps / readeck_ynh

Readeck package for YunoHost
https://readeck.org/
GNU Affero General Public License v3.0
2 stars 2 forks source link

Forward slash (`/`) in label name breaks label’s page #22

Open xplosionmind opened 3 weeks ago

xplosionmind commented 3 weeks ago

Description of the bug

When a label is created, it is allowed (since no error is shown) to use the forward slash (/). Unfortunately, though, if it is used the page of that label is impossible to view.

For example, by creating the coding/javascript label, both https://example.com/bookmarks/labels/coding%2Fjavascript and https://example.com/bookmarks/labels/coding/javascript return a 404 error.

Solution

Alright, I found the culprit :) (it wasn't the database but nginx) Readeck's documentation incorrectly asks to put proxy_pass http://127.0.0.1:8000/; while it must be proxy_pass http://127.0.0.1:8000; (no trailing slash).

The documentation will be updated. On YunoHost, this file should be updated: https://github.com/YunoHost-Apps/readeck_ynh/blob/master/conf/nginx.conf

-proxy_pass http://127.0.0.1:__PORT__/;
+proxy_pass http://127.0.0.1:__PORT__;

Source: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

From https://codeberg.org/readeck/readeck/issues/277#issuecomment-2418764