Project

General

Profile

Bug #4268

Spoof by hostname still searches by an empty IP and returns the wrong host

Added by Dominic Cleal over 5 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When accessing a spoof URL by hostname (e.g. /unattended/PXELinux?hostname=foo.example.com), the code tries to retrieve an IP and hostname from params, then searches by IP and hostname. If only the hostname was given, it does a find_by_ip(nil), which may return a host (not the right one).


Related issues

Related to Foreman - Feature #359: Add support for 'hostname=<hostname>' spoofing for Unattended InstallsClosed2010-07-27
Has duplicate Foreman - Bug #4382: Spoof by hostname does not work if there is a host without an IP addressDuplicate2014-02-18

Associated revisions

Revision 1e0fd283 (diff)
Added by Dominic Cleal over 5 years ago

fixes #4268 - don't search for host with nil IP on hostname spoofing

Revision e32790d3 (diff)
Added by Dominic Cleal over 5 years ago

fixes #4268 - don't search for host with nil IP on hostname spoofing

(cherry picked from commit 1e0fd283180dc6bda30c880898cdea69cb579194)

Conflicts:
test/fixtures/hosts.yml

History

#1 Updated by Dominic Cleal over 5 years ago

  • Related to Feature #359: Add support for 'hostname=<hostname>' spoofing for Unattended Installs added

#2 Updated by Dominic Cleal over 5 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Dmitri Dolguikh over 5 years ago

  • Target version changed from 1.9.2 to 1.9.1

#4 Updated by Dominic Cleal over 5 years ago

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

#5 Updated by Dominic Cleal over 5 years ago

  • Has duplicate Bug #4382: Spoof by hostname does not work if there is a host without an IP address added

Also available in: Atom PDF