Update src/Common/HTTPHeaderFilter.cpp

Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
This commit is contained in:
San 2023-08-08 17:13:43 +10:00 committed by GitHub
parent ede710ce83
commit 4f6f8fce65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ void HTTPHeaderFilter::checkHeaders(const HTTPHeaderEntries & entries) const
{ {
if (entry.name.contains('\n') || entry.value.contains('\n')) if (entry.name.contains('\n') || entry.value.contains('\n'))
throw Exception(ErrorCodes::BAD_ARGUMENTS, "HTTP header \"{}\" has invalid character", entry.name); throw Exception(ErrorCodes::BAD_ARGUMENTS, "HTTP header \"{}\" has invalid character", entry.name);
if (forbidden_headers.contains(entry.name)) if (forbidden_headers.contains(entry.name))
throw Exception(ErrorCodes::BAD_ARGUMENTS, "HTTP header \"{}\" is forbidden in configuration file, " throw Exception(ErrorCodes::BAD_ARGUMENTS, "HTTP header \"{}\" is forbidden in configuration file, "
"see <http_forbid_headers>", entry.name); "see <http_forbid_headers>", entry.name);