mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
Treat '+' as a safe MIME type character.
This addresses a review comment from https://codereview.chromium.org/681303003/diff/120001/util/net/http_multipart_builder.cc#newcode107 R=mark@chromium.org Review URL: https://codereview.chromium.org/694483002
This commit is contained in:
parent
9db5d6f773
commit
123e01f96d
@ -104,6 +104,7 @@ void AssertSafeMIMEType(const std::string& string) {
|
||||
c == '/' ||
|
||||
c == '.' ||
|
||||
c == '_' ||
|
||||
c == '+' ||
|
||||
c == '-');
|
||||
}
|
||||
}
|
||||
|
@ -257,6 +257,8 @@ TEST(HTTPMultipartBuilder, AssertUnsafeMIMEType) {
|
||||
ASSERT_DEATH(builder.SetFileAttachment("", "", base::FilePath(), "<>"), "");
|
||||
// Invalid but safe:
|
||||
builder.SetFileAttachment("", "", base::FilePath(), "0/totally/-invalid.pdf");
|
||||
// Valid and safe:
|
||||
builder.SetFileAttachment("", "", base::FilePath(), "application/xml+xhtml");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user