mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-10 00:42:14 +00:00
Improved LDAP authentication
This commit is contained in:
parent
9234359a93
commit
77e292a9c0
4 changed files with 22 additions and 10 deletions
|
|
@ -172,7 +172,7 @@ static int is_authorized(const struct mg_connection *conn,
|
|||
string auth_header = auth_header_p ? auth_header_p : "";
|
||||
istringstream iss(auth_header);
|
||||
getline(iss, auth_type, ' ');
|
||||
if (auth_type == "Basic") {
|
||||
if(auth_type == "Basic") {
|
||||
string decoded_auth, user_s = "", pword_s = "";
|
||||
/* In case auth type is Basic, info are encoded in base64 */
|
||||
getline(iss, auth_string, ' ');
|
||||
|
|
@ -187,7 +187,7 @@ static int is_authorized(const struct mg_connection *conn,
|
|||
mg_get_cookie(conn, "user", username, username_len);
|
||||
mg_get_cookie(conn, "session", session_id, sizeof(session_id));
|
||||
|
||||
if (!strcmp(username, NTOP_NOLOGIN_USER) && !user_login_disabled)
|
||||
if(!strcmp(username, NTOP_NOLOGIN_USER) && !user_login_disabled)
|
||||
/* Trying to access web interface with nologin after ntopng restart
|
||||
with different settings */
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue