Greetings!
I noticed that some API calls do not properly URL encode their output. This is specifically becoming a problem when Piwigo is configured with $conf['sync_chars_regex'] to allow filename characters such as a space.
For example, the tn_url attribute returned in pwg.categories.getList contains spaces for image filenames that contain spaces whereas I would expect them to be properly encoded, i.e. a space becomes %20
pwg.categories.getImages behaves in a similar way and URLs of all derivates returned contain spaces.
This currently crashes the Piwigo Mobile application when the sharing extension is called. I submitted a PR, but was sent here instead.
I've tested this both with Piwigo Version 11.5 and 12.0
Offline
Could you please tell us which plugins do not encode URLs correctly?
Offline
My comment wasn't about plugins. Here are the steps to reproduce what happens
1. Install plain vanilla piwigo 12.1.0 - the only plugins installed are those from the installation package and they are all disabled by default
2. Manually (command line) configure $conf['sync_chars_regex'] in local/config/config.inc.php to allow spaces in file names
3. Login as admin and synchronise some images which contain spaces in file names. This succeeds because of step #2
4. Switch to http://mydomain/mypiwigo/tools/ws.htm and run pwg.categories.getImages, i.e. http://mydomain/mypiwigo/ws.php?format=json&method=pwg.categories.getImages&recursive=true
5. Check the output: images[0]->derivatives->square->url looks like "http://mydomain/mypiwigo/i.php?/galleries/2021/21-10-28 08-36-00 8468-sq.jpg"
I would argue the filename part of the url is improperly encoded, and should be
"http://mydomain/mypiwigo/i.php?/galleries/2021/21-10-28%2008-36-00%208468-sq.jpg"
6. Same pattern for all other derivative urls and the element_url property. They are all improperly encoded.
Offline
Hi zero0cool,
The version 2.9 of the iOS app should fix these issues.
Offline