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

David Shea dshea at redhat.com
Fri Aug 22 21:43:45 UTC 2014


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.


More information about the anaconda-patches mailing list