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 829437 - Hitting enter with blank field for GPG name returns JSON content
Summary: Hitting enter with blank field for GPG name returns JSON content
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-06 18:36 UTC by Corey Welton
Modified: 2019-09-25 20:44 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
GPG key creation with an empty "name" field resulted in JSON text returned on the screen instead of a properly formatted error due to incorrect validation of file uploads. This fix corrects the validation and the error message correctly displays.
Clone Of:
Environment:
Last Closed: 2012-10-24 14:22:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
stack returned when performing this behavior (55.32 KB, text/plain)
2012-09-17 15:37 UTC, Corey Welton
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Corey Welton 2012-06-06 18:36:35 UTC
Description of problem:

When  creating a GPG key, if a user hits "enter" on an unpopulated GPG Key name field, JSON text is returned on the screen instead of the expected error message. This does not occur if user hits the submit button.

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


How reproducible:


Steps to Reproduce:
1.  Content Management > Content Providers > GPG Keys > +New GPG Key
2.  Do not enter anything in the Name field; paste some text into the GPG 
3.  Hit the Save button - note the expected error about name validation.
4.  Click into the Name field; do not enter any text and hit Enter/Return

  
Actual results:
JSON output
{"validation_errors":["Name must contain at least 2 characters","Content can't be blank"],"notices":[]}

Expected results:
The error gets sent/bubbles up to UI as a notification as per any other notification.

Additional info:
The worst part about this bug is that user doesn't seem to be able to hit the back button in the browser a few times to return to the UI - s/he is just bounced back and forth between URLs for 
/cfse/gpg_keys and /cfse/gpg_keys#panel=new, both of which contain the same JSON.

Comment 1 Ivan Necas 2012-07-02 07:19:51 UTC
commit 5ddcc146b787291780c45b0d60778e8226b5fc35
Author: Ivan Necas <inecas>
Date:   Fri Jun 29 14:10:41 2012 +0200

    829437 - handle uploading GPG key when submitting with enter

commit 8ecf419805b3363d0949e3a854ccce542c9184d1
Merge: 163c2af 9c71bc3
Author: Tom McKay <thomasmckay>

Comment 3 Corey Welton 2012-09-17 15:36:50 UTC
Fails in bigger, better ways now :)

Now, when hitting enter in the gpg key name field, a stack is returned - see forthcoming attachment.

CloudForms System Engine Version: 1.1.12-7.el6cf

Comment 4 Corey Welton 2012-09-17 15:37:35 UTC
Created attachment 613714 [details]
stack returned when performing this behavior

Comment 5 Ivan Necas 2012-09-18 10:01:37 UTC
It's connect with 857727, I suggest to disable ignoring enter button entirely in the name field. Reason: from user point of view after entering the name he still needs either enter the key in the text box or select the file. And then he has to press the button according the way he inserts the key. In other words, there is little possibility that hitting enter in the name will be successful (gpg key is blank).

@corey: Would this proposed solution work for you?

Comment 6 Corey Welton 2012-09-18 13:08:03 UTC
We can try that out and see if it remedies the issue; I'll also be checking afterwards to see if I can identify any corner cases where this still might show up.

Comment 7 Ivan Necas 2012-09-21 06:12:21 UTC
It was different issue at the end (wrong handing of validation errors when uploading the file through iframe). Fixed in https://github.com/Katello/katello/pull/693, commit bdb774be54dbbfd84f17cf72ef2b24845c73fb77

Comment 10 Corey Welton 2012-09-25 20:03:08 UTC
QE Verified

CloudForms System Engine Version: 1.1.12-9.el6cf

Comment 11 David Davis 2012-10-09 21:23:54 UTC
*** Bug 859329 has been marked as a duplicate of this bug. ***

Comment 12 Mike McCune 2012-10-24 14:22:07 UTC
closing, currentrelease since these seemingly got missed in the 1.0.1 errata

Comment 13 Mike McCune 2013-08-16 17:57:18 UTC
getting rid of 6.0.0 version since that doesn't exist


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