Bug 472600

Summary: iOS device fails to mount with certain characters in device name
Product: [Frameworks and Libraries] frameworks-kio Reporter: Ambareesh Balaji <ambareeshbalaji>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kde, kdelibs-bugs
Priority: NOR    
Version First Reported In: 5.108.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ambareesh Balaji 2023-07-25 00:51:33 UTC
SUMMARY
When there are certain URL unsafe characters in a device name, the device fails to mount. It appears there is an incomplete "hack" in place for handling spaces in the device name, but it's not sufficient for handling `(` and `)`: https://invent.kde.org/network/kio-extras/-/blame/master/afc/kio_afc.cpp#L276


STEPS TO REPRODUCE
1. Rename an iOS device to have a `(` in the name (Settings -> General -> About -> Name). Let's say "iPad (2)" for example
2. Connect the device with USB cable
3. Click "Trust" on the pairing dialog if it shows up
4. `idevicepair validate` should succeed with "SUCCESS: Validated pairing with device xxxx-xxxx"
5. Now, try opening the device in Dolphin

OBSERVED RESULT
Error message "Loading canceled" in Dolphin
Error in console `kf.kio.workers.afc: Failed to normalize "iPad (2)" into a valid URL host, this is a bug!`

EXPECTED RESULT
Should work fine just like when there are no URL unsafe characters in the name.
Comment 1 Chandradeep Dey 2023-10-06 12:46:47 UTC

*** This bug has been marked as a duplicate of bug 462381 ***