otp = MHD_lookup_connection_value(conn, MHD_GET_ARGUMENT_KIND, "otp");
h = MHD_lookup_connection_value(conn, MHD_GET_ARGUMENT_KIND, "h");
syslog(LOG_DEBUG, "Got new connection with parameters: "
- "url=%s id=%s otp=<hidden>, h=%s\n", url, id, h);
+ "url=%s id=%s otp=%s, h=%s\n", url, id,
+ (conf->log_otp ? otp : "<hidden>"), h);
/* Do query to grab shared secret, we need this later anyway */
if (get_shared_secret(id, &shared_secret, &shared_secret_len) < 0) {
c->port = strtol(value, NULL, 0);
continue;
}
+ if (strcmp(key, "log_otp") == 0) {
+ c->log_otp = strtol(value, NULL, 0);
+ continue;
+ }
}
return 0;
}