From d7bb1f183c3296e63da3e9c107366efd9aaad17a Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 16 Feb 2012 07:25:56 -0800 Subject: [PATCH] Trim "\n" from mimeType field in phabricator_file.file Summary: See patch comment, which explains the situation. Test Plan: Ran upgrade, verified mimeType field is \n-free in database. Reviewers: davidreuss, btrahan Reviewed By: davidreuss CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1624 --- resources/sql/patches/105.mimetype.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 resources/sql/patches/105.mimetype.sql diff --git a/resources/sql/patches/105.mimetype.sql b/resources/sql/patches/105.mimetype.sql new file mode 100644 index 0000000000..99f53a5580 --- /dev/null +++ b/resources/sql/patches/105.mimetype.sql @@ -0,0 +1,4 @@ +/* Prior to D1615, we used the raw output of `file` to determine mime types, + without stripping carriage returns. This creates Content-Type headers + which are blocked by response-splitting protections introduced in D1564. */ +UPDATE phabricator_file.file SET mimeType = TRIM(BOTH "\n" FROM mimeType);