Verify Content-Type from smart HTTP servers
Before parsing a suspected smart-HTTP response verify the returned Content-Type matches the standard. This protects a client from attempting to process a payload that smells like a smart-HTTP server response. JGit has been doing this check on all responses since the dawn of time. I mistakenly failed to include it in git-core when smart HTTP was introduced. At the time I didn't know how to get the Content-Type from libcurl. I punted, meant to circle back and fix this, and just plain forgot about it. Signed-off-by: Shawn Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e1b6ff44d6
commit
4656bf47fc
@ -80,6 +80,7 @@ fi
|
||||
prepare_httpd() {
|
||||
mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH"
|
||||
cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH"
|
||||
cp "$TEST_PATH"/broken-smart-http.sh "$HTTPD_ROOT_PATH"
|
||||
|
||||
ln -s "$LIB_HTTPD_MODULE_PATH" "$HTTPD_ROOT_PATH/modules"
|
||||
|
||||
|
Reference in New Issue
Block a user