iPXE discussion forum
HTTP Basic Auth escape password - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: HTTP Basic Auth escape password (/showthread.php?tid=7789)



HTTP Basic Auth escape password - rhwood - 2015-08-12 22:03

I am attempting to use HTTP(S) basic authentication to control access to a PXE boot menu in an iPXE script:

Code:
#!ipxe
dhcp || exit
login || exit
boot https://${username:uristring}:${password:uristring}@${net0.dhcp/next-server}/pxe/menu.php || exit

Passwords with the commercial at symbol (@) fail because the at symbol is not being escaped. How can I escape it?


RE: HTTP Basic Auth escape password - mcb30 - 2015-08-25 14:16

(2015-08-12 22:03)rhwood Wrote:  
Code:
boot https://${username:uristring}:${password:uristring}@${net0.dhcp/next-server}/pxe/menu.php ||

Passwords with the commercial at symbol (@) fail because the at symbol is not being escaped. How can I escape it?

Your syntax is correct. The latest commit http://git.ipxe.org/ipxe.git/commitdiff/ba36953 should fix the problem.

Michael