Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bug #17703 MimeType validated incorrectly

  • Loading branch information...
commit da9708d4aea583c5d260e6da825b2e0f717525d1 1 parent 3e198f8
@CloCkWeRX CloCkWeRX authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  HTTP/Download2.php
View
2  HTTP/Download2.php
@@ -570,7 +570,7 @@ function setContentDisposition( $disposition = HTTP_DOWNLOAD2_ATTACHMENT,
*/
function setContentType($content_type = 'application/x-octetstream')
{
- if (!preg_match('/^[a-z]+\w*\/[a-z]+[\w.;= -]*$/', $content_type)) {
+ if (!preg_match('/^[a-z]+\w*\/[a-z0-9]+[\w.;=\+ -]*$/', $content_type)) {
throw new HTTP_Download2_Exception(
"Invalid content type '$content_type' supplied.",
HTTP_DOWNLOAD2_E_INVALID_CONTENT_TYPE
Please sign in to comment.
Something went wrong with that request. Please try again.