Bug 2117734

Summary: sshkey entries aren't properly escaped when they contain quotes in anaconda-ks.cfg
Product: [Fedora] Fedora Reporter: Martin VanWinkle <mvanwinkle>
Component: pykickstartAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 37CC: anaconda-maint-list, bcl, jkonecny, jonathan, kellin, mkolman, rvykydal, vanmeeuwen+fedora, vponcova, w
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: pykickstart-3.43-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2121877 (view as bug list) Environment:
Last Closed: 2022-08-29 19:38:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2121877    

Description Martin VanWinkle 2022-08-11 18:24:04 UTC
Description of problem:

I'm unsure if this is still a problem with the current version, and I'm building on Springdale Linux 9, buuut:

In my kickstart file I have:

```
sshkey --username=root "from=\"192.168.1.1\" ssh-rsa ...
```
And in anaconda-ks.cfg, you get:

```
sshkey --username=root "from=192.168.1.1" ssh-rsa 

```

If you notice, the slashes escaping the quotes are missing.


Version-Release number of selected component (if applicable):


How reproducible:

Any build with an sshkey entry that has from="..." in it.


Steps to Reproduce:
1.  Build a machine with an sshkey that has a "from" entry with quotes.
2.  Quotes aren't properly escaped in resulting ~root/anaconda-ks.cfg
3.

Actual results:


Expected results:

Quotes properly escaped.

Additional info:

Sorry if this still isn't a bug, I'm putting this together in a rush.

Comment 1 Brian Lane 2022-08-15 18:08:08 UTC
This is a bug in pykickstart, thanks for reporting it.

Comment 3 Fedora Update System 2022-08-29 19:36:36 UTC
FEDORA-2022-9631be2d02 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9631be2d02

Comment 4 Fedora Update System 2022-08-29 19:38:49 UTC
FEDORA-2022-9631be2d02 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.