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

Maxim Dounin mdounin at mdounin.ru
Thu Jun 15 00:22:18 UTC 2023


# 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" .


More information about the nginx-devel mailing list