RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2149362 - sshkey entries aren't properly escaped when they contain quotes in anaconda-ks.cfg
Summary: sshkey entries aren't properly escaped when they contain quotes in anaconda-k...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: anaconda
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On: 2121877
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-11-29 17:37 UTC by Brian Lane
Modified: 2023-05-09 08:35 UTC (History)
3 users (show)

Fixed In Version: anaconda-34.25.2.4-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:35:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-140812 0 None None None 2022-11-29 17:52:43 UTC
Red Hat Issue Tracker RTT-5045 0 None None None 2022-11-30 14:44:41 UTC
Red Hat Issue Tracker RTT-5046 0 None None None 2022-11-30 14:44:46 UTC
Red Hat Product Errata RHBA-2023:2223 0 None None None 2023-05-09 07:36:00 UTC

Description Brian Lane 2022-11-29 17:37:25 UTC
This bug was initially created as a copy of Bug #2121877

I am copying this bug because: 

Anaconda needs to use the new RHEL9_SshKeyData class in order for this to work.

+++ This bug was initially created as a clone of Bug #2117734 +++

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.

--- Additional comment from Brian Lane on 2022-08-15 11:08:08 PDT ---

This is a bug in pykickstart, thanks for reporting it.

--- Additional comment from Brian Lane on 2022-08-26 15:47:22 PDT ---

https://github.com/pykickstart/pykickstart/pull/422

Comment 1 Brian Lane 2022-11-29 17:57:56 UTC
PR against rhel-9 branch here (I think that's the correct branch?) - https://github.com/rhinstaller/anaconda/pull/4454

Comment 8 errata-xmlrpc 2023-05-09 07:35:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (anaconda bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2223


Note You need to log in before you can comment on or make changes to this bug.