Bug 1204548 - Unexpected $end error when generating report on registries with filtering set
Summary: Unexpected $end error when generating report on registries with filtering set
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.4.0
Assignee: Martin Hradil
QA Contact: Ramesh A
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-23 00:58 UTC by Jerome Marc
Modified: 2015-06-16 12:54 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:54:29 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Report causing the error (1.58 KB, text/x-vhdl)
2015-03-23 00:58 UTC, Jerome Marc
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Jerome Marc 2015-03-23 00:58:28 UTC
Created attachment 1005117 [details]
Report causing the error

Description of problem:
Unexpected error occurs when trying to generate the attached report. The report filters particular registries based on the registry 'value' and 'value name' (e.g. value: 'Edition Type' and value name: 'Express Edition').

Version-Release number of selected component (if applicable):
CloudForms 3.1
CFME: 5.3.3.2.20150217120931_a465215 

How reproducible:
Always. Also trying other filters with same error.

Steps to Reproduce:
1. Import attached report
2. Make sure your analysis profile contains the following Registry Item:
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server : *
3. Perform SmartState Analysis on VMs where MS SQL Server is installed
4. Generate the report

Actual results:
An unexpected error occurs. Here are some of the outcome received (collected from 'Configure > Tasks > All Other Tasks'
Message:
(eval):1: unterminated string meets end of file (eval):1: syntax error, unexpected $end, expecting ')' ...rver\90\Shared\' =~ /Express/)) ... ^ 
(eval):1: unterminated string meets end of file (eval):1: syntax error, unexpected $end, expecting ')' !('C:\Program Files\Microsoft SQL Server\90\Shared\' =~ /Express/) ^ 
(eval):1: unterminated string meets end of file (eval):1: syntax error, unexpected $end, expecting ')' ...rver\90\Shared\' =~ /Express/)) ... ^ 
(eval):1: unterminated string meets end of file 
Task Name:
Generate Report: 'Inventory: Registry (tmp)' 

Expected results:
Report should be generated

Additional info:

Comment 6 CFME Bot 2015-04-27 13:55:49 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/998dfd2447a2d99f6bd223e53d9d954bf7a7e24f

commit 998dfd2447a2d99f6bd223e53d9d954bf7a7e24f
Author:     Martin Hradil <mhradil>
AuthorDate: Thu Mar 26 19:48:05 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Thu Apr 16 19:12:49 2015 +0000

    MiqExpression - quote even values with backslashes properly
    
    previously, a filter like field includes value would only escape apostrophes in the value
    for values like Windows paths (ie r'foo\bar\'), this would generate illegal ruby code, leading to unexcpeted $end on eval
    
    Since Object#inspect should always generate properly escaped ruby code, using that one.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1204548

 vmdb/app/models/miq_expression.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comment 8 Ramesh A 2015-05-22 18:20:27 UTC
Good to go.  Verified and working fine in 5.4.0.2.20150519003830_673f996

Comment 10 errata-xmlrpc 2015-06-16 12:54:29 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://rhn.redhat.com/errata/RHBA-2015-1100.html


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