Bug 1378427

Summary: Hostname while creating discovery rule should not accept the name in html tags
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: bbuckingham, lzap
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-03 08:06:37 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:

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: