Bug 1378427 - Hostname while creating discovery rule should not accept the name in html tags
Summary: Hostname while creating discovery rule should not accept the name in html tags
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-22 11:40 UTC by Sachin Ghai
Modified: 2016-10-03 08:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-03 08:06:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Sachin Ghai 2016-09-22 11:40:21 UTC
Description of problem:
I was trying to create hostgroup via CLI and UI and the gve html tags in hostname and it was accepted by rule and rule was created. However, html names shouldn't be accepted by rule.

2016-09-22 16:38:04 - robottelo.ssh - DEBUG - >>> LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv discovery_rule create --hostgroup-id="73" --location-ids="157" --name="WtjWj4OecF" --search="cpu_count = 1" --organization-ids="156" --hostname="<var>RFuNdfAprC</var>"
2016-09-22 16:38:05 - robottelo.ssh - DEBUG - <<< stdout
Message,Id,Name
Rule created,105,WtjWj4OecF

2016-09-22 16:38:05 - robottelo.ssh - INFO - Destroying Paramiko client 0x7f125420b0d0
2016-09-22 16:38:05 - robottelo.ssh - INFO - Destroyed Paramiko client 0x7f125420b0d0
2016-09-22 16:38:08 - robottelo.ssh - INFO - Instantiated Paramiko client 0x7f125420b950
2016-09-22 16:38:08 - robottelo.ssh - DEBUG - Connected to [cloud-qe-15.idmqe.lab.eng.bos.redhat.com]
2016-09-22 16:38:08 - robottelo.ssh - DEBUG - >>> LANG=en_US.UTF-8  hammer -v -u admin -p changeme  discovery_rule info --id="105"
2016-09-22 16:38:09 - robottelo.ssh - DEBUG - <<< stdout
ID:                105
Name:              WtjWj4OecF
Priority:          0
Search:            cpu_count = 1
Host Group:        QLJuIC
Hosts Limit:       0
Enabled:           true
Hostname template: <var>RFuNdfAprC</var>


In webUI, when you pass html tags, rule got created but you won't see the rule name when you edit it.

Version-Release number of selected component (if applicable):
sat6.3 snap1

How reproducible:


Steps to Reproduce:
1. create discovery rule via html tags
2.
3.

Actual results:
rule is getting created with html tags

Expected results:
rule should not be created with html tags

Additional info:


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