Skip to content

./auth_basic.t fails #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
raboof opened this issue Nov 19, 2024 · 3 comments
Closed

./auth_basic.t fails #10

raboof opened this issue Nov 19, 2024 · 3 comments

Comments

@raboof
Copy link

raboof commented Nov 19, 2024

When testing against nginx-1.26.2 on NixOS, ./auth_basic.t fails:

./auth_basic.t ............................. 1/26 
#   Failed test 'normal crypt'
#   at ./auth_basic.t line 91.
#                   'HTTP/1.1 500 Internal Server Error
# Server: nginx/1.27.2
# Date: Tue, 19 Nov 2024 22:50:00 GMT
# Content-Type: text/html
# Content-Length: 177
# Connection: close
# 
# <html>
# <head><title>500 Internal Server Error</title></head>
# <body>
# <center><h1>500 Internal Server Error</h1></center>
# <hr><center>nginx/1.27.2</center>
# </body>
# </html>
# '
#     doesn't match '(?^:SEETHIS)'

#   Failed test 'crypt $1$ (md5)'
#   at ./auth_basic.t line 94.
#                   'HTTP/1.1 500 Internal Server Error
# Server: nginx/1.27.2
# Date: Tue, 19 Nov 2024 22:50:00 GMT
# Content-Type: text/html
# Content-Length: 177
# Connection: close
# 
# <html>
# <head><title>500 Internal Server Error</title></head>
# <body>
# <center><h1>500 Internal Server Error</h1></center>
# <hr><center>nginx/1.27.2</center>
# </body>
# </html>
# '
#     doesn't match '(?^:SEETHIS)'

#   Failed test 'crypt $1$ broken'
#   at ./auth_basic.t line 97.
#                   'HTTP/1.1 500 Internal Server Error
# Server: nginx/1.27.2
# Date: Tue, 19 Nov 2024 22:50:00 GMT
# Content-Type: text/html
# Content-Length: 177
# Connection: close
# 
# <html>
# <head><title>500 Internal Server Error</title></head>
# <body>
# <center><h1>500 Internal Server Error</h1></center>
# <hr><center>nginx/1.27.2</center>
# </body>
# </html>
# '
#     doesn't match '(?^:401 Unauthorized)'
# Looks like you failed 3 tests of 26.
./auth_basic.t ............................. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/26 subtests 

Is that somehow expected or something to look into?

@pluknet
Copy link
Contributor

pluknet commented Jan 15, 2025

That means nginx was not built with crypt() support, so these password types are not available.
For details, see http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html.

@pluknet pluknet closed this as completed Jan 15, 2025
@raboof
Copy link
Author

raboof commented Jan 17, 2025

gotcha, thanks for pointing me in the right direction! Indeed this was the problem - I actually had crypt support enabled, but only for strong hashing functions, so with DES and MD5 hashing disabled.

I guess it would be nice to detect this in the test, but indeed I don't see an obvious way how.

@pluknet
Copy link
Contributor

pluknet commented Jan 17, 2025

Yep, detection problem is why crypt tests are only skipped for win32, where libcrypt is used to be absent.
All other platforms we use to run tests do have libcrypt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants