Skip to content
  • Jon Yurek's avatar
    9aee4112
    Fix a possible security issue with spoofing · 9aee4112
    Jon Yurek authored
    Thanks to MORI Shingo of DeNA Co., Ltd. for reporting this.
    
    There is an issue where if an HTML file is uploaded with a .html
    extension, but the content type is listed as being `image/jpeg`, this
    will bypass a validation checking for images. But it will also pass the
    spoof check, because a file named .html and containing actual HTML
    passes the spoof check.
    
    This change makes it so that we also check the supplied content type. So
    even if the file contains HTML and ends with .html, it doesn't match the
    content type of `image/jpeg` and so it fails.
    9aee4112
    Fix a possible security issue with spoofing
    Jon Yurek authored
    Thanks to MORI Shingo of DeNA Co., Ltd. for reporting this.
    
    There is an issue where if an HTML file is uploaded with a .html
    extension, but the content type is listed as being `image/jpeg`, this
    will bypass a validation checking for images. But it will also pass the
    spoof check, because a file named .html and containing actual HTML
    passes the spoof check.
    
    This change makes it so that we also check the supplied content type. So
    even if the file contains HTML and ends with .html, it doesn't match the
    content type of `image/jpeg` and so it fails.
To find the state of this project's repository at the time of any of these versions, check out the tags.
Loading