Use configured session timeout for digest auth validation

This commit is contained in:
vdutta 2022-09-06 11:43:12 +05:30
parent 06278ffdca
commit be24316b69
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@
#define DEFAULT_RETRY_MAX_INTERVAL 60
#define DEFAULT_AMD_VERSION 5
#define DEFAULT_INSTANCE_MODE 0
#define DEFAULT_SESSION_TIMEOUT 60
#define DEFAULT_SESSION_TIMEOUT 300
#define MAX_NBRE_SERVICES 256
#define FIREWALL_CWMP "/etc/firewall.cwmp"
#define CWMP_VARSTATE_UCI_PACKAGE "/var/state/cwmp"

View file

@ -377,7 +377,7 @@ static void http_cr_new_client(int client, bool service_available)
}
CWMP_LOG(INFO, "Received host: (%s)", request_host);
int auth_check = validate_http_digest_auth("GET", cwmp_main.conf.connection_request_path, auth_digest_buffer + strlen("Authorization: Digest "), REALM, username, password, 300, request_host);
int auth_check = validate_http_digest_auth("GET", cwmp_main.conf.connection_request_path, auth_digest_buffer + strlen("Authorization: Digest "), REALM, username, password, cwmp_main.conf.session_timeout, request_host);
if (auth_check == -1) { /* invalid nonce */
internal_error = true;
goto http_end;