Bug 478453 - Portal makes app crash when an invalid file name is input
Summary: Portal makes app crash when an invalid file name is input
Status: REPORTED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.27.10
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 20:22 UTC by pato05mc
Modified: 2023-12-12 20:33 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 pato05mc 2023-12-12 20:22:08 UTC
SUMMARY
I noticed the bug first in Rnote and apparently it affects Telegram as well (and I'm guessing every application that makes use of portals). It is present within the Save file dialog, where inputting a name containing a forward slash in it will make the parent application crash (in the case of Rnote) or hang (in the case of Telegram).


STEPS TO REPRODUCE
1. Open a save file dialog within the targeted application (e.g. Save As option on Rnote)
2. The KDE Portal Save dialog will pop up, just put a name that contains a forward slash character (/) in the middle (like "foo/bar")

OBSERVED RESULT
The application will either crash or hang

EXPECTED RESULT
Either the Save dialog would tell the user that the filename contains an illegal character, or just replace the "/" character with a similar one "⁄" like it happens in Dolphin. 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux (on 6.6.5-zen1-1-zen)
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11

ADDITIONAL INFORMATION
Original issue reported in Rnote: https://github.com/flxzt/rnote/issues/926