From: Aki Tuomi Date: Thu, 20 Oct 2016 13:30:49 +0000 (+0300) Subject: auth: Escape local_name X-Git-Tag: 2.2.26~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=065efd7cd1a5f5c6ae19946b78c90a3f40f856cc;p=thirdparty%2Fdovecot%2Fcore.git auth: Escape local_name --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 64fa691678..539f1f74d1 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -319,8 +319,10 @@ void auth_request_export(struct auth_request *request, string_t *dest) str_printfa(dest, "\treal_lport=%u", request->real_local_port); if (request->real_remote_port != 0) str_printfa(dest, "\treal_rport=%u", request->real_remote_port); - if (request->local_name != 0) - str_printfa(dest, "\tlocal_name=%s", request->local_name); + if (request->local_name != 0) { + str_append(dest, "\tlocal_name="); + str_append_tabescaped(dest, request->local_name); + } if (request->session_id != NULL) str_printfa(dest, "\tsession=%s", request->session_id); if (request->debug) diff --git a/src/lib-auth/auth-client-request.c b/src/lib-auth/auth-client-request.c index 968dc98e8f..c25a1d760b 100644 --- a/src/lib-auth/auth-client-request.c +++ b/src/lib-auth/auth-client-request.c @@ -81,8 +81,10 @@ static void auth_server_send_new_request(struct auth_server_connection *conn, info->real_remote_port != info->remote_port) str_printfa(str, "\treal_rport=%u", info->real_remote_port); if (info->local_name != NULL && - *info->local_name != '\0') - str_printfa(str, "\tlocal_name=%s", info->local_name); + *info->local_name != '\0') { + str_append(str, "\tlocal_name="); + str_append_tabescaped(str, info->local_name); + } if (info->initial_resp_base64 != NULL) { str_append(str, "\tresp="); str_append_tabescaped(str, info->initial_resp_base64);