Bug 469697 - xdg-desktop-portal-kde - Account - GetUserInformation portal provides the name and image fields the wrong way around (and image should be URI)
Summary: xdg-desktop-portal-kde - Account - GetUserInformation portal provides the nam...
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: 2023-05-13 13:13 UTC by garethdanielsmith
Modified: 2023-05-18 19:02 UTC (History)
3 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 garethdanielsmith 2023-05-13 13:13:59 UTC
SUMMARY

When GetUserInformation (https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Account) is called, the results are a bit wrong:
- The image field contains the user name
- The name field contains the image path
- The image path, as well as being in the wrong field, is given as a regular file path but it should be (according to the spec linked above) a file:// URI.

Looking at the code, it seems like this is a straightforward mistake:
https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/userinfodialog.cpp#L55

STEPS TO REPRODUCE
1. install and run https://flathub.org/apps/io.github.Dretch.MonomerFlatpakExample
2. click "Get User Information"

OBSERVED RESULT
The "User name" and "User image" values are the wrong way around (and the image is not a URI).
Comment 1 Bug Janitor Service 2023-05-16 06:46:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/197
Comment 2 Harald Sitter 2023-05-16 11:10:41 UTC
Git commit 7d5a7b6fe2ee98b41d3ab51f4ff8e83cd1660f1e by Harald Sitter.
Committed on 16/05/2023 at 06:46.
Pushed by sitter into branch 'master'.

return correct user info

the return values were the wrong way around and the image ought to be a
URI not a path.

M  +2    -2    src/userinfodialog.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/7d5a7b6fe2ee98b41d3ab51f4ff8e83cd1660f1e
Comment 3 Harald Sitter 2023-05-16 11:12:46 UTC
Git commit d95f420cecb70890502f3152e3eb4429456a5ce9 by Harald Sitter.
Committed on 16/05/2023 at 11:11.
Pushed by sitter into branch 'Plasma/5.27'.

return correct user info

the return values were the wrong way around and the image ought to be a
URI not a path.


(cherry picked from commit 7d5a7b6fe2ee98b41d3ab51f4ff8e83cd1660f1e)

M  +2    -2    src/userinfodialog.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/d95f420cecb70890502f3152e3eb4429456a5ce9
Comment 4 garethdanielsmith 2023-05-18 19:02:12 UTC
Thanks!