Commit 1d3f6787 authored by Leigh B Stoller's avatar Leigh B Stoller

Add another sanity check in the image URN.

parent b89493e3
......@@ -1641,12 +1641,12 @@ sub CreateImageCreds($$$;$)
# Yep, people put the URL in the URN spot. We should throw an error.
if ($image_urn =~ /^(http|https):/);
$image_urn = GeniHRN->new($image_urn);
if (! (defined($image_urn) && $image_urn->IsImage())) {
if (!GeniHRN::IsValid($image_urn)) {
$$pmsg = "$image_urn is not a valid URN";
return 1;
$image_urn = GeniHRN->new($image_urn);
# System images are global (well, it would be rare if not).
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment