[master/rhel7] Handle spaces in inst.repo, kickstart nfs, and url commands (#1109933)

Brian C. Lane bcl at redhat.com
Fri Aug 22 22:47:10 UTC 2014


On Fri, Aug 22, 2014 at 05:43:45PM -0400, David Shea wrote:
> On 08/21/2014 02:30 PM, Brian C. Lane wrote:
> >  class URL(commands.url.F18_Url):
> >      def dracut_args(self, args, lineno, obj):
> >-        args = ["inst.repo=%s" % self.url]
> >+        # Spaces in the url need to be %20
> >+        method = self.url.replace(" ", "%20")
> >+        args = ["inst.repo=%s" % method]
> >+
> >          if self.noverifyssl:
> >              args.append("rd.noverifyssl")
> >          if self.proxy:
> This is the only part of the patch that worries me. These are kickstart URLs
> with unquoted spaces up in the middle of them? That's kind of a weird thing
> to do, and not a valid thing as far as URLs are concerned, so I think it
> would be ok to just reject that case.
> 
> Though if we are accepting URLs with weird stuff it would be better to use a
> bigger hammer like urllib.quote to catch any other potential weird stuff.

Yeah, I didn't want to drag urllib into dracut (I don't think it gets
pulled in currently) and really they should insert their own %20 into
the url -- but I don't think it hurts anything to include it.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list