Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1482395 - SCAP CLI has no max length limit for original-filename parameter
Summary: SCAP CLI has no max length limit for original-filename parameter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-17 07:40 UTC by Sanket Jagtap
Modified: 2021-07-21 14:54 UTC (History)
5 users (show)

Fixed In Version: foreman_openscap 0.7.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:51:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20670 0 Normal Closed SCAP CLI has no max length limit for original-filename parameter 2019-12-17 20:20:08 UTC

Description Sanket Jagtap 2017-08-17 07:40:29 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv scap-content create --original-filename="Igh0IgphDVzgKlf74JsXNGEYtgWR7SvuxrX31SRTWEoaYazC7eHKchdh9S8hMEP6sZxiBXPpcShUfNZwsMpRsEQanguWXpcjp0mkQz0FGCTKxTXqZuOquPN2gTLhvvAodV1FTkJLcYnIMNz33v8HTwiKCDriNHKcmMyoSTE4Z0Dfwqy6RJRQB7nygByMfmJAkn9mhuPXZT3ewSoA1d6wNelzV2n0VWlv6c3OK5JkWam1qugcc6ZiyjJffmqNzzPhEj1L3t1i0rftTKJ08pa7K7RvPer6QcmqgP3ja8A85LyacgEg71vHR18o3gCeb9q7FjGiGXcfBnCbwAwEyoWuRj9xsdeZc3MeWlhlXR0Wjw6yhpJ8vQKyVB0qVRL7OOxETovhXoe8JMnXVJmsvkIZpzaU9uxHKYvfutvE6yqjXbWCoQqOA4heZTxloIXk70XczeNvMOnHixT9L1mDLP8aYinfq5CCFpySnFo8sqfbTKRwZIocRNAvrcOADsY1sOZwkvrP7vrrZgXBfV5nMGULRNmHR6v2lDLmJPbFGn581xQ25jAdpZQhZHglcmTYRZ0HzBpgrT7xVEEz4vXlgqGibmaXVagU7iKpG5FhfgSHakXQ99dIIGCT4WBarwTfkK5zBQOdxSkMWz7Pu5wtohkNdyxcRzFfSwpMVtofs5RvgRo4UuP1wgOqvKAKAeTqKxp9nyRCYYs7PYkBvK4bf6btKXIwmImW5mNi0IHhDn624iCwUMXtEhdBf8qav38rP1vzHQ4YUJBwjLqaSeMzRmSWieUVgd0CZuMJEZpzanxc4R2szGeSbTvNdZgWfU6ZsoYtwlS5LlZWLKlApjpKI9gHXiCRKsrMXtcr1sME7afLcR6JQyYweHBFiwaHb5XSLshyshkj" --title="6wq9kzzwcp" --scap-file="/tmp/ssg-rhel6-ds.xml"
2017-08-17 13:04:56 - robottelo.ssh - INFO - <<< stdout
Message,Id,Name
Scap content successfully created,id,name


Actual results:
No max length limit , or validation

Expected results:
There should be validation of the value passed to original-filename parameter

Additional info:

Comment 2 Ondřej Pražák 2017-08-21 11:21:31 UTC
Created redmine issue http://projects.theforeman.org/issues/20670 from this bug

Comment 3 Satellite Program 2017-08-21 12:17:48 UTC
Upstream bug assigned to oprazak

Comment 4 Satellite Program 2017-08-21 12:17:51 UTC
Upstream bug assigned to oprazak

Comment 5 Satellite Program 2017-08-22 10:17:42 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20670 has been resolved.

Comment 6 Nikhil Kathole 2017-09-10 07:51:29 UTC
VERIFIED

Version Tested:
Satellite-6.3 Snap 15

steps:

# hammer -v -u admin -p changeme --output=csv scap-content create --original-filename="Igh0Ig
phDVzgKlf74JsXNGEYtgWR7SvuxrX31SRTWEoaYazC7eHKchdh9S8hMEP6sZxiBXPpcShUfNZwsMpRsEQanguWXpcjp0mkQz0FGCTKxTXqZuOquPN2gTLhv
vAodV1FTkJLcYnIMNz33v8HTwiKCDriNHKcmMyoSTE4Z0Dfwqy6RJRQB7nygByMfmJAkn9mhuPXZT3ewSoA1d6wNelzV2n0VWlv6c3OK5JkWam1qugcc6Zi
yjJffmqNzzPhEj1L3t1i0rftTKJ08pa7K7RvPer6QcmqgP3ja8A85LyacgEg71vHR18o3gCeb9q7FjGiGXcfBnCbwAwEyoWuRj9xsdeZc3MeWlhlXR0Wjw6
yhpJ8vQKyVB0qVRL7OOxETovhXoe8JMnXVJmsvkIZpzaU9uxHKYvfutvE6yqjXbWCoQqOA4heZTxloIXk70XczeNvMOnHixT9L1mDLP8aYinfq5CCFpySnF
o8sqfbTKRwZIocRNAvrcOADsY1sOZwkvrP7vrrZgXBfV5nMGULRNmHR6v2lDLmJPbFGn581xQ25jAdpZQhZHglcmTYRZ0HzBpgrT7xVEEz4vXlgqGibmaXV
agU7iKpG5FhfgSHakXQ99dIIGCT4WBarwTfkK5zBQOdxSkMWz7Pu5wtohkNdyxcRzFfSwpMVtofs5RvgRo4UuP1wgOqvKAKAeTqKxp9nyRCYYs7PYkBvK4b
f6btKXIwmImW5mNi0IHhDn624iCwUMXtEhdBf8qav38rP1vzHQ4YUJBwjLqaSeMzRmSWieUVgd0CZuMJEZpzanxc4R2szGeSbTvNdZgWfU6ZsoYtwlS5LlZ
WLKlApjpKI9gHXiCRKsrMXtcr1sME7afLcR6JQyYweHBFiwaHb5XSLshyshkj" --title="6wq9kzzwcp" --scap-file="ssg-rhel6-ds.xml"

>>>

[ERROR 2017-09-10 03:44:55 API] 422 Unprocessable Entity
[ERROR 2017-09-10 03:44:55 Exception] Original filename is too long (maximum is 255 characters)
Failed to create Scap content:
  Original filename is too long (maximum is 255 characters)
[ERROR 2017-09-10 03:44:55 Exception]

RestClient::UnprocessableEntity (422 Unprocessable Entity):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:352:in `block in rest_client_call_block'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `process_result'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
    /opt/rh/rh-ruby23/root/usr/share/ruby/net/http.rb:853:in `start'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:324:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.2.0/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/apipie/command.rb:43:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:166:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/bin/hammer:147:in `<top (required)>'
    /usr/bin/hammer:23:in `load'
    /usr/bin/hammer:23:in `<main>'

Shows error as Original filename is too long (maximum is 255 characters).

Comment 7 Satellite Program 2018-02-21 16:51:07 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/RHSA-2018:0336


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