Project

General

Profile

Bug #20919

katello-change-hostname silently fails when there are special (shell) chars in the password

Added by Evgeni Golov about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tooling
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Hi,

my admin password is change$me, so I call

katello-change-hostname katello.example.com -u admin -p 'change$me'

However, this seems not to be passed correctly while calling hammer, as the password is not quoted:

…
Updating default Foreman Proxy
Invalid username or password
…
**** Hostname change complete! **** 

And there is a new proxy added, instead of being updated:

# hammer capsule list
[Foreman] Password for admin: 
---|----------------------------------------|-----------------------------------------------------|--------------------------
ID | NAME                                   | URL                                                 | FEATURES                 
---|----------------------------------------|-----------------------------------------------------|--------------------------
1  | centos7-katello-3-4.kangae.example.com | https://centos7-katello-3-4.kangae.example.com:9090 | Pulp, TFTP, Puppet, Pu...
2  | katello.example.com                    | https://katello.example.com:9090                    | Pulp, TFTP, Puppet, Pu...
---|----------------------------------------|-----------------------------------------------------|--------------------------

Associated revisions

Revision ece3dc6f (diff)
Added by Evgeni Golov about 4 years ago

Fixes #20919 - use Shellwords.escape to escape hammer user/pass

History

#1 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-packaging/pull/526 added

#2 Updated by Evgeni Golov about 4 years ago

  • Category set to Tooling

#3 Updated by Evgeni Golov about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Justin Sherrill about 4 years ago

  • Legacy Backlogs Release (now unused) set to 250

Also available in: Atom PDF