Bug 247473 - Cannot enter GPG key URL starting with http: -- error GPG Key URL invalid - please enter a valid URL
Summary: Cannot enter GPG key URL starting with http: -- error GPG Key URL invalid - p...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Usability
Version: 500
Hardware: All
OS: Linux
high
low
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: wes hayutin
URL: https://rlx-1-12.rhndev.redhat.com/ne...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-09 15:10 UTC by Jan Pazdziora
Modified: 2007-08-29 15:26 UTC (History)
2 users (show)

Fixed In Version: sat501
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-29 15:26:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2007-07-09 15:10:29 UTC
Description of problem:

This is from Ian's report at

http://post-office.corp.redhat.com/archives/rhn-satellite/2007-July/msg00034.html

In Satellite 5, it seems that it's only possible to specify a file:///
URL for a channel GPG key URL.  Any URL that begins with http:// brings
up an error message that says:

  GPG Key URL invalid - please enter a valid URL

Is this intended?  If so, shouldn't the error message be a little more
helpful (not to mention accurate)?

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

I've verified this on rlx-1-12 running 5.0.0.

How reproducible:

Deterministic. Also by looking at code.

Steps to Reproduce:
1. Go to the Manage Software Channels -> create new channel.
2. Enter mandatory fields, and the GPG key URL value starting with http://
3. Hit Create Channel.

Actual results:

Red error message at the top of the form:

GPG Key URL invalid - please enter a valid URL

Expected results:

No error message.

Additional info:

Comment 1 Jan Pazdziora 2007-07-09 15:14:30 UTC
Looking at the code, both revisions 108641 and 108646 were incorrect.

We probably want to apply the following change:

Index: web/modules/sniglets/Sniglets/ChannelEditor.pm
===================================================================
--- web/modules/sniglets/Sniglets/ChannelEditor.pm      (revision 118117)
+++ web/modules/sniglets/Sniglets/ChannelEditor.pm      (working copy)
@@ -222,7 +222,7 @@
   }
 
   my $gpg_url = $pxt->dirty_param('channel_gpg_key_url');
-  if ($gpg_url ne '' and not $gpg_url =~ m(^(http[s]|file)?\://.*?$)) {
+  if ($gpg_url ne '' and not $gpg_url =~ m(^(https?|file)\://.*?$)) {
     $pxt->push_message(local_alert => "GPG Key URL invalid - please enter a
valid URL");
     $errors++;
   }


Comment 3 Jan Pazdziora 2007-07-18 14:17:42 UTC
I did not find any such bug in hosted, and in
https://engineering.redhat.com/trac/rhn-hosted/browser/hosted/trunk/web/modules/sniglets/Sniglets/ChannelEditor.pm
the code is still unfixed.

I've now committed the fix to Satellite SVN, trunk revision 118393, branch
RELEASE-5.0 revision 118394.

Comment 4 John Ha 2007-07-31 01:04:39 UTC
Does this require a release note entry? To me it's iffy because the behavior is
supposed to be reported, but then again, it could be considered a new feature :)

Let me know either way. Thanks in advance.

Comment 5 John Ha 2007-07-31 01:30:29 UTC
Does this require a release note entry? To me it's iffy because the behavior is
supposed to be supported, but then again, it could be considered a new feature :)

Let me know either way. Thanks in advance.

Comment 6 Jan Pazdziora 2007-07-31 07:46:32 UTC
It really depends what criteria for release notes we have in general. It is a
fix of a regression which was reported once internally and once by a customer.

If you want a release note, it would be something like:

Channel GPG key URL entry now correctly accepts file, http and https protocols.

Comment 7 John Ha 2007-08-01 01:47:38 UTC
In my experience, release note entries have been for both major feature releases
and big bug fixes. If this is not a major bug fix, I'd leave it out. Clifford,
it's your call.

Comment 8 Clifford Perry 2007-08-01 12:50:18 UTC
Yes - please add to release notes. 

From speaking recently with 15 odd Sales Engineers, right now it is 'known' by
many that http:// will not work and only https does. Since there was no need to
enforce a https:// path to your GPG key file, we should make a small note that
this was changed, so folks who do this on a regular basis know. 

Cliff. 



Comment 9 John Ha 2007-08-02 17:38:02 UTC
Done. It's in the release notes verbatim from comment #6. Thanks again, Jan.

Comment 10 Jan Pazdziora 2007-08-02 20:35:49 UTC
Moving ON_QA because:

Satellite 5.0.1-1 and Proxy 5.0.1-1 are now available on webqa hosted
channels.  Satellite 5.0.1-1 ISOs are now available.

Comment 11 Corey Welton 2007-08-03 14:25:18 UTC
QA verified that "http://"-prefaced URLs are no longer rejected by the webui.


Comment 12 wes hayutin 2007-08-22 19:19:47 UTC
release pending


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