This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: rfc/patch: user-agent distro-description for debuginfod http traffic
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: elfutils-devel at sourceware dot org
- Date: Tue, 07 Jan 2020 16:50:24 +0100
- Subject: Re: rfc/patch: user-agent distro-description for debuginfod http traffic
- References: <20200106095303.GA2161@redhat.com>
* Frank Ch. Eigler:
> - return string(hostname) + string(":") + string(servname);
> + // extract headers relevant to administration
> + const char* user_agent = MHD_lookup_connection_value (conn, MHD_HEADER_KIND, "User-Agent") ?: "";
> + const char* x_forwarded_for = MHD_lookup_connection_value (conn, MHD_HEADER_KIND, "X-Forwarded-For") ?: "";
> + // NB: these are untrustworthy, beware if machine-processing log files
> +
> + return string(hostname) + string(":") + string(servname) + string(" UA:") + string(user_agent) + string(" XFF:") + string(x_forwarded_for);
> }
>
>
Should this add quoting to make the field boundaries unforgeable?
Thanks,
Florian