Bug 454850 - URIs are not encoded
Summary: URIs are not encoded
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-04 19:25 UTC by Be
Modified: 2022-06-06 10:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Be 2022-06-04 19:25:14 UTC
The documentation for the D-Bus API specifies several places where a URI is returned. However, the returned value is not URI encoded; spaces are still spaces rather than %20. The GNOME XDG Destop Portal backend does encode these URIs. This lead to me, as an application developer developing using KDE, neglecting to deal with URI encoding, producing code that only worked on KDE but not GNOME.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 36
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.17.11-300.fc36.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620


ADDITIONAL INFORMATION
https://codeberg.org/Be.ing/moire/issues/4
https://github.com/PolyMeilex/rfd/pull/70
Comment 1 Nicolas Fella 2022-06-05 18:07:56 UTC
sigh, apparently x-d-p upstream knows about this, but nobody told us: https://github.com/flatpak/xdg-desktop-portal/issues/799
Comment 2 Bug Janitor Service 2022-06-05 18:41:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/108
Comment 3 Nicolas Fella 2022-06-06 10:10:31 UTC
Git commit 9865283589a866e725fa72b19df45d5285a5bae7 by Nicolas Fella.
Committed on 06/06/2022 at 10:06.
Pushed by nicolasfella into branch 'master'.

[filechooser] Make sure outgoing URIs are encoded

URIs are expected to be encoded. e.g. spaces are replaced by %20

See https://github.com/flatpak/xdg-desktop-portal/issues/799

M  +1    -1    src/filechooser.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/9865283589a866e725fa72b19df45d5285a5bae7
Comment 4 Nicolas Fella 2022-06-06 10:12:50 UTC
Git commit 4c5664fc0adfb3f2d331935a174a2e60ccd1758d by Nicolas Fella.
Committed on 06/06/2022 at 10:10.
Pushed by nicolasfella into branch 'Plasma/5.25'.

[filechooser] Make sure outgoing URIs are encoded

URIs are expected to be encoded. e.g. spaces are replaced by %20

See https://github.com/flatpak/xdg-desktop-portal/issues/799
(cherry picked from commit 9865283589a866e725fa72b19df45d5285a5bae7)

M  +1    -1    src/filechooser.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/4c5664fc0adfb3f2d331935a174a2e60ccd1758d
Comment 5 Nicolas Fella 2022-06-06 10:17:27 UTC
Git commit 4f88bd08dbd24a75e84a87b299535414f4ee1477 by Nicolas Fella.
Committed on 06/06/2022 at 10:17.
Pushed by nicolasfella into branch 'Plasma/5.24'.

[filechooser] Make sure outgoing URIs are encoded

URIs are expected to be encoded. e.g. spaces are replaced by %20

See https://github.com/flatpak/xdg-desktop-portal/issues/799

M  +2    -2    src/filechooser.cpp
M  +1    -1    src/kirigami-filepicker/api/mobilefiledialog.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/4f88bd08dbd24a75e84a87b299535414f4ee1477