Bug 406211

Summary: Adding SMB(Windows) printer in System Settings fails to add printer if any field contains spaces
Product: [Applications] systemsettings Reporter: Dmitri Ionin <dmitri.ionin>
Component: kcm_printer_managerAssignee: Daniel Nicoletti <dantti12>
Status: CONFIRMED ---    
Severity: normal CC: lukasmueller187, materka, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitri Ionin 2019-04-04 10:14:37 UTC
SUMMARY
Silent failure to add Samba/Windows printer if password contains spaces.
If %20 is used in place of space in the password, adding works.
Possibly extends to all special characters, but haven't tested that extensively.

STEPS TO REPRODUCE
1. Add printer, selecting Samba/Windows URI
2. Fill in uri, user and password
3. Select printer driver

OBSERVED RESULT
Printer is not added if password contains a space.

EXPECTED RESULT
Printer should be added and password encoded/encrypted properly even if password contains space or other special characters.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 18.04.2
System Settings Version 5.12.7
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5
Comment 1 Konrad Materka 2019-11-05 10:24:49 UTC
Printer add silently fails when space is also in the printer URI, for example:
Fails:
smb://hostname/Xerox 7228
Works:
smb://hostname/Xerox%207228
Comment 2 lukasmueller187 2023-07-24 12:01:08 UTC
The %20 workaround in the path didn't work for me. Using the CUPS Web-Interface, however, did work with the %20 workaround.