mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
post_auth_handler: added error checking to cstp_printf
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -1730,10 +1730,11 @@ int post_auth_handler(worker_st * ws, unsigned http_ver)
|
||||
if (sd != -1)
|
||||
close(sd);
|
||||
oclog(ws, LOG_HTTP_DEBUG, "HTTP sending: 401 Unauthorized");
|
||||
cstp_printf(ws,
|
||||
ret = cstp_printf(ws,
|
||||
"HTTP/1.%d 401 %s\r\nContent-Length: 0\r\n\r\n",
|
||||
http_ver, reason);
|
||||
cstp_fatal_close(ws, GNUTLS_A_ACCESS_DENIED);
|
||||
if (ret >= 0)
|
||||
cstp_fatal_close(ws, GNUTLS_A_ACCESS_DENIED);
|
||||
talloc_free(msg);
|
||||
exit_worker(ws);
|
||||
cleanup:
|
||||
|
||||
Reference in New Issue
Block a user