← Commit list

c0a279a8e9

Stefan Eissing
Stefan Eissing
2025-10-09
SUCCESS Duration: 230s

Subject

socks: deny server basic-auth if not configured

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/socks.c+6 -2
@@ -681,8 +681,12 @@ static CURLproxycode socks5_check_resp0(struct socks_state *sx,
return CURLPX_GSSAPI_PERMSG;
case 2:
/* regular name + password authentication */
- sxstate(sx, cf, data, SOCKS5_ST_AUTH_INIT);
- return CURLPX_OK;
+ if(data->set.socks5auth & CURLAUTH_BASIC) {
+ sxstate(sx, cf, data, SOCKS5_ST_AUTH_INIT);
+ return CURLPX_OK;
+ }
+ failf(data, "BASIC authentication proposed but not enabled.");
+ return CURLPX_NO_AUTH;
case 255:
failf(data, "No authentication method was acceptable.");
return CURLPX_NO_AUTH;