Bug 247473 - Cannot enter GPG key URL starting with http: -- error GPG Key URL invalid - please enter a valid URL
Cannot enter GPG key URL starting with http: -- error GPG Key URL invalid - p...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Usability (Show other bugs)
500
All Linux
high Severity low
: ---
: ---
Assigned To: Jan Pazdziora
wes hayutin
https://rlx-1-12.rhndev.redhat.com/ne...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-09 11:10 EDT by Jan Pazdziora
Modified: 2007-08-29 11:26 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat501
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-29 11:26:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2007-07-09 11:10:29 EDT
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 11:14:30 EDT
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 10:17:42 EDT
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-30 21:04:39 EDT
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-30 21:30:29 EDT
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 03:46:32 EDT
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-07-31 21:47:38 EDT
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 08:50:18 EDT
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 13:38:02 EDT
Done. It's in the release notes verbatim from comment #6. Thanks again, Jan.
Comment 10 Jan Pazdziora 2007-08-02 16:35:49 EDT
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 10:25:18 EDT
QA verified that "http://"-prefaced URLs are no longer rejected by the webui.
Comment 12 wes hayutin 2007-08-22 15:19:47 EDT
release pending

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