Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Adriaan
On Wed, Jul 20, 2022 at 9:09 AM Alexander Hall  wrote:

>
> > [snip]
> >The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
> >will eliminate those '='s and see whether that helps.
>
> See
> https://github.com/openbsd/src/blob/636cc85955243f5226db2246a74229481ad6bac2/distrib/miniroot/install.sub#L1838
>
> It seems we do not allow "@" either at the moment...
>
> /Alexander
>
> Thank you,

A pity I did not see your post earlier, In the installer, I had to page
with lousy 'more(1)' to find that location. It is on line 1422 of
'install.sub' of the 7.1 bsd.rd. As reported in my other mail, adding "@"
to the regex, as well as eliminating the "=" from the password solved it
and I was able to install.


Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Adriaan
At about line 1422 of the install.sub the hostname is checked with a ksh
specific pattern:
cat -n install.sub | sed -ne '/?(http/p'
  1422  ?(http?(s)://)+([A-Za-z0-9:.\[\]_-]))

With sed(1) I added "@" to the pattern
cat -n install.sub | sed -ne '/?(http/p'
  1422  ?(http?(s)://)+([@A-Za-z0-9:.\[\]_-]))

And now the the server name validates as OK:

Location of sets? (disk http nfs or 'done') [http]
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none]
HTTP Server? (hostname, list#, 'done' or '?') [
wodan:ilovefreya@192.168.222.242]
Server directory? [pub/OpenBSD/7.1/amd64] OpenBSD/7.1/amd64
Unable to connect using HTTPS; using HTTP instead.

Select sets by entering a set name, a file name pattern or 'all'.
De-select
sets by prepending a '-', e.g.: '-game*'. Selected sets are labelled
'[X]'.
[X] bsd [X] man71.tgz   [X] xfont71.tgz
[X] bsd.rd  [X] game71.tgz  [X] xserv71.tgz
[X] base71.tgz  [X] xbase71.tgz [ ] site71.tgz
[X] comp71.tgz  [X] xshare71.tgz[X] site71-df-us.tgz
Set name(s)? (or 'abort' or 'done') [done] -comp* -game* -x* site* done
Get/Verify SHA256.sig   100% |**|  2144
00:00

So with the addition of '@' as well as using an user name and password that
matches the regex pattern it works well.

A happy camper 


On Wed, Jul 20, 2022 at 6:06 AM Adriaan  wrote:

> I am testing autoinstall for a VPS hosted in a datacenter. By using an
> OpenBSD native VM on my desktop
> I got all my issues with 'install.conf'  and 'install.site' solved.
>
> To provide some access control I created an '.htaccess' file for my
> local httpd server at 192.168.222.242 and
> for my external  webserver xyz.nl
>
> The retrieval of 'install.conf' as well as the autopartitioning
> template are successful:
>
> Response file location? [http://192.168.222.10/install.conf]
> https://wodan:=ilovefreya=@xyz.nl/install.conf
> Fetching https://wodan:=ilovefreya=@xyz.nl/install.conf
> Performing non-interactive install...
> Terminal type? [vt220] vt220
> [snip]
>
> URL to autopartitioning template for disklabel? [none]
> https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
> Fetching https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>
> So far so good
>
> However the installing of the sets fails with a 'not a valid hostname'
>
> Location of sets? (disk http nfs or 'done') [http] http
> HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
> HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:=ilovefreya=@192.168.222.242
> 'wodan:=ilovefreya=@192.168.222.242' is not a valid hostname.
>
> The same error occurs when I want to install the custom site* sets
> from my non-local xyz.nl server
>
> HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
> wodan:=ilovefreya=@xyz.nl
> 'wodan:=ilovefreya=@xyz.nl' is not a valid hostname.
>
> So using an username and password for .htaccess control is accepted by
> bsd.rd for the 'install.conf' and
> autopartioning template, while it errors out when dealing with the install
> sets.
>
> The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
> will eliminate those '='s and see whether that helps.
>
> Adriaan van Roosmalen
>


Re: 'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-20 Thread Alexander Hall



On July 20, 2022 6:06:45 AM GMT+02:00, Adriaan  wrote:
>I am testing autoinstall for a VPS hosted in a datacenter. By using an
>OpenBSD native VM on my desktop
>I got all my issues with 'install.conf'  and 'install.site' solved.
>
>To provide some access control I created an '.htaccess' file for my
>local httpd server at 192.168.222.242 and
>for my external  webserver xyz.nl
>
>The retrieval of 'install.conf' as well as the autopartitioning
>template are successful:
>
>Response file location? [http://192.168.222.10/install.conf]
>https://wodan:=ilovefreya=@xyz.nl/install.conf
>Fetching https://wodan:=ilovefreya=@xyz.nl/install.conf
>Performing non-interactive install...
>Terminal type? [vt220] vt220
>[snip]
>
>URL to autopartitioning template for disklabel? [none]
>https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>Fetching https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
>
>So far so good
>
>However the installing of the sets fails with a 'not a valid hostname'
>
>Location of sets? (disk http nfs or 'done') [http] http
>HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
>HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
>wodan:=ilovefreya=@192.168.222.242
>'wodan:=ilovefreya=@192.168.222.242' is not a valid hostname.
>
>The same error occurs when I want to install the custom site* sets
>from my non-local xyz.nl server
>
>HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
>wodan:=ilovefreya=@xyz.nl
>'wodan:=ilovefreya=@xyz.nl' is not a valid hostname.
>
>So using an username and password for .htaccess control is accepted by
>bsd.rd for the 'install.conf' and
>autopartioning template, while it errors out when dealing with the install 
>sets.
>
>The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
>will eliminate those '='s and see whether that helps.

See 
https://github.com/openbsd/src/blob/636cc85955243f5226db2246a74229481ad6bac2/distrib/miniroot/install.sub#L1838

It seems we do not allow "@" either at the moment...

/Alexander

>
>Adriaan van Roosmalen
>



'not a valid hostname' error in 'bsd.rd' when using ,htaccess authorization

2022-07-19 Thread Adriaan
I am testing autoinstall for a VPS hosted in a datacenter. By using an
OpenBSD native VM on my desktop
I got all my issues with 'install.conf'  and 'install.site' solved.

To provide some access control I created an '.htaccess' file for my
local httpd server at 192.168.222.242 and
for my external  webserver xyz.nl

The retrieval of 'install.conf' as well as the autopartitioning
template are successful:

Response file location? [http://192.168.222.10/install.conf]
https://wodan:=ilovefreya=@xyz.nl/install.conf
Fetching https://wodan:=ilovefreya=@xyz.nl/install.conf
Performing non-interactive install...
Terminal type? [vt220] vt220
[snip]

URL to autopartitioning template for disklabel? [none]
https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt
Fetching https://wodan:=ilovefreya=@xyz.nl/7.1/amd64/df-us-40gb.txt

So far so good

However the installing of the sets fails with a 'not a valid hostname'

Location of sets? (disk http nfs or 'done') [http] http
HTTP proxy URL? (e.g. 'http://proxy:8080', or 'none') [none] none
HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
wodan:=ilovefreya=@192.168.222.242
'wodan:=ilovefreya=@192.168.222.242' is not a valid hostname.

The same error occurs when I want to install the custom site* sets
from my non-local xyz.nl server

HTTP Server? (hostname, list#, 'done' or '?') [192.168.222.242]
wodan:=ilovefreya=@xyz.nl
'wodan:=ilovefreya=@xyz.nl' is not a valid hostname.

So using an username and password for .htaccess control is accepted by
bsd.rd for the 'install.conf' and
autopartioning template, while it errors out when dealing with the install sets.

The password '=ilovefreya=' has a leading and trailing '='. Tomorrow I
will eliminate those '='s and see whether that helps.

Adriaan van Roosmalen