Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pass CGI arguments to kickstart - Bring back uristring encoding?
2015-06-05, 03:13
Post: #3
RE: Pass CGI arguments to kickstart - Bring back uristring encoding?
Input for the lvm and raid values are just zero or one. I just used them as brief examples but they don't include any characters that need encoding! Sorry, a better example is:

Code:
echo -n Media: ${}              && read media

for which I would enter something like:

Code:
media url --url http://mirror.centos.org/centos/7/os/x86_64/

This contains at least spaces which should be encoded as %20. From what I can tell, git iPXE only automatically encodes the first argument as in the examples from the mailing list you referenced.

Automatic URI encoding (of the first argument) is nice when your using things like:

Code:
chain ${url_with_spaces}

but the kickstart URL at the end is not automatically URI encoded and I can no longer manually URI encode it since "uristring" is now an alias for "string":

Code:
# ipxe command (abbreviated with ...)
kernel vmlinuz ... ks=http://ks.lan/ks/ks7.php?${query}

# expands to
kernel vmlinuz ... ks=http://ks.lan/ks/ks7.php?raid=1&lvm=1&media=media url --url http://mirror.centos.org/centos/7/os/x86_64/

# actually calls (truncates after first space)
kernel vmlinuz ... ks=http://ks.lan/ks/ks7.php?raid=1&lvm=1&media=media

# should expand to
kernel vmlinuz ... ks=http://ks.lan/ks/ks7.php?raid=1&lvm=1&media=media%20url%20%2d%2durl%20http%3a%2f%2fmirror%2ecentos%2eorg%2fcentos%​2f7%2fos%2fx86_64%2f

I'm currently using v1.0 which supports manual uristring but it would be nice to use newer versions Wink
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Pass CGI arguments to kickstart - Bring back uristring encoding? - nichivo - 2015-06-05 03:13



User(s) browsing this thread: 1 Guest(s)