mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-22 18:51:48 +02:00
Fix random 401 Forbidden on Ubuntu 20 and other newer releases
This commit is contained in:
parent
120dcbeaba
commit
fbe05cee86
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <crypt.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -929,7 +930,10 @@ ws_ctx_t *do_handshake(int sock) {
|
|||||||
snprintf(authbuf, 4096, "%s%s", settings.basicauth, pwbuf);
|
snprintf(authbuf, 4096, "%s%s", settings.basicauth, pwbuf);
|
||||||
authbuf[4095] = '\0';
|
authbuf[4095] = '\0';
|
||||||
|
|
||||||
const char *encrypted = crypt(resppw, "$5$kasm$");
|
struct crypt_data cdata;
|
||||||
|
cdata.initialized = 0;
|
||||||
|
|
||||||
|
const char *encrypted = crypt_r(resppw, "$5$kasm$", &cdata);
|
||||||
*resppw = '\0';
|
*resppw = '\0';
|
||||||
|
|
||||||
snprintf(pwbuf, 4096, "%s%s", response, encrypted);
|
snprintf(pwbuf, 4096, "%s%s", response, encrypted);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user