Bug 1225857 - Viewing partition table with name as html data, throws an error on UI.
Summary: Viewing partition table with name as html data, throws an error on UI.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Tomer Brisker
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: 1316897
TreeView+ depends on / blocked
 
Reported: 2015-05-28 10:41 UTC by Jitendra Yejare
Modified: 2020-01-17 15:31 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:51:54 UTC
Target Upstream Version:


Attachments (Terms of Use)
Screenshots attached (264.36 KB, application/x-gzip)
2015-05-28 10:41 UTC, Jitendra Yejare
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Jitendra Yejare 2015-05-28 10:41:03 UTC
Created attachment 1031199 [details]
Screenshots attached

Description of problem:
Viewing a partition table with name as html data (e.g. <table>something<table>)
throws an error on UI.
Error:

'The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.'

Version-Release number of selected component (if applicable):
Sat6.1 GA Snap 5 Compose 2

How reproducible:
Always

Steps to Reproduce:
1. Create a partition table with name as html data with tags as mentioned in description.
2. After successful creation, click on that partition table to view.

Actual results:
The page shows an error, 'The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved'. And no other data displayed of that partition table displayed.

Expected results:
Page should not throw any exception.

Comment 2 Jitendra Yejare 2015-06-26 12:37:14 UTC
The bug is still exists in Sat 6.1 beta.

The error of 'The page you were looking for doesn't exist.' has been thrown by Partitions Table page for html name data.

Comment 3 Oleksandr Shtaier 2015-09-22 07:30:06 UTC
Increasing severity level as same issue applicable for delete operation which means that you cannot remove from the system all incorrect entries and they will stick there until issue is fixed

Slight difference in URLs in address bar:
View operation - https://server_name/ptables
Delete operation - https://server_name/ptables/<table>something</table>

But, in general, showing same error message: 'The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved'. Maybe, only that message seems smaller for view operation

Comment 4 Stuart Auchterlonie 2015-12-14 11:29:02 UTC
It's even simpler to trigger than using html in the name.

It is sufficient to name the Partition Table with a name containing '/'
such as. 

"Sat6 Satellite/Capsule"

Customer are quite likely to use a name containing '/'

Comment 6 Stuart Auchterlonie 2015-12-17 14:34:40 UTC
Work around identified by SEG.

-----

# su - postgres
psql foreman
select * from ptables;

find the id of the partition table that is the one that you can not get to.

Then do the following

\quit
exit

# foreman-rake console

> pbtable.find(id).destroy
> exit

-----

Comment 7 dnguyen 2015-12-18 13:37:37 UTC
Satellite 6.1.5 

I have the same issue and the above  workaround does not work 

[root@satrhs-prd-01 pulp]# foreman-rake console
Loading production environment (Rails 3.2.8)
irb(main):001:0>
irb(main):002:0*
irb(main):003:0*
irb(main):004:0*
irb(main):005:0*
irb(main):006:0* pbtable.find(16).destroy
NameError: undefined local variable or method `pbtable' for main:Object
        from (irb):6
        from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
        from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
        from /usr/share/foreman/lib/tasks/console.rake:3:in `block in <top (required)>'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
        from /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
        from /opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'irb(main):007:0>
irb(main):008:0* >pbtable.find(16).destroy
SyntaxError: (irb):8: syntax error, unexpected '>'
>pbtable.find(16).destroy
 ^
        from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
        from /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
        from /usr/share/foreman/lib/tasks/console.rake:3:in `block in <top (required)>'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
        from /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
        from /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
        from /opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'irb(main):009:0>

Comment 12 Jitendra Yejare 2016-03-22 09:40:16 UTC
Verified this bug in Sat 6.2 snap 4 with partition table names having html tags(contains <,>,/) and with question mark.

The issue is no more reproducible.

I can create, view and delete partition tables with said characters.

Moving the state to Verified.

Comment 15 errata-xmlrpc 2016-07-27 08:51:54 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, 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-2016:1500


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