[PATCH] Tests: fixed warning on win32 in auth_basic.t

Sergey Kandaurov pluknet at nginx.com
Thu Jun 15 12:53:07 UTC 2023


> On 15 Jun 2023, at 04:22, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 
> # HG changeset patch
> # User Maxim Dounin <mdounin at mdounin.ru>
> # Date 1686748038 -10800
> #      Wed Jun 14 16:07:18 2023 +0300
> # Node ID 032ccd3118cbd5a4cc170a12667cc31ddd279c1f
> # Parent  f61d1b4ac638e756c7540dff4d2d69a82d7274fb
> Tests: fixed warning on win32 in auth_basic.t.
> 
> diff -r f61d1b4ac638 -r 032ccd3118cb auth_basic.t
> --- a/auth_basic.t	Wed Jun 14 16:57:01 2023 +0400
> +++ b/auth_basic.t	Wed Jun 14 16:07:18 2023 +0300
> @@ -64,8 +64,8 @@ EOF
> 
> $t->write_file(
> 	'htpasswd',
> -	'crypt:' . crypt('password', 'salt') . "\n" .
> -	'crypt1:' . crypt('password', '$1$salt$') . "\n" .
> +	'crypt:' . (crypt('password', 'salt') || '') . "\n" .
> +	'crypt1:' . (crypt('password', '$1$salt$') || '') . "\n" .
> 	'crypt2:' . '$1$' . "\n" .
> 	'apr1:' . '$apr1$salt$Xxd1irWT9ycqoYxGFn4cb.' . "\n" .
> 	'apr12:' . '$apr1$' . "\n" .

No objections, including that it may not be available per perlport.
I assume crypt returns undef due to missing functionality?

Just for the record: on what Perl version such warnings observed?
None seen on two different native Perl versions and one from msys.

-- 
Sergey Kandaurov


More information about the nginx-devel mailing list