Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-9947

When trying to upload a .bmp file, mime validation fails in upload UI

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Outdated
    • 3.2.0
    • None
    • None
    • None

    Description

      If you add *.bmp (example file: hippo.bmp) in the following:
      /hippo:configuration/hippo:frontend/cms/cms-services/imageValidationService/@extensions.allowed
      , increase the max.file.size to 10M and upload a bmp file, then it fails with error and log like this:

      [INFO] [talledLocalContainer] 25.02.2016 23:47:29 WARN  http-nio-8080-exec-9 [AjaxFileUploadBehavior.setResponse:156] file hippo.bmp contains errors: The file 'hippo.bmp' content does not match with the given MIME type: image/x-ms-bmp
      

      The following is a result from running `identify` command of ImageMagic for the hippo.bmp, which is assuring it's BMP file:

      $ identify -verbose hippo.bmp 
      Image: hippo.bmp
        Format: BMP (Microsoft Windows bitmap image)
        Class: DirectClass
        Geometry: 1763x1080+0+0
        Resolution: 0.01x0.01
        Print size: 176300x108000
        Units: PixelsPerCentimeter
        Type: TrueColor
        Endianess: Undefined
        Colorspace: sRGB
        Depth: 8-bit
        Channel depth:
          red: 8-bit
          green: 8-bit
          blue: 8-bit
        Channel statistics:
          Pixels: 1904040
          Red:
            min: 0 (0)
            max: 255 (1)
            mean: 122.999 (0.482347)
            standard deviation: 35.9398 (0.14094)
            kurtosis: 1.78174
            skewness: -1.11897
            entropy: 0.851629
          Green:
            min: 0 (0)
            max: 255 (1)
            mean: 140.395 (0.550569)
            standard deviation: 40.5896 (0.159175)
            kurtosis: 2.99303
            skewness: -1.7844
            entropy: 0.84158
          Blue:
            min: 0 (0)
            max: 251 (0.984314)
            mean: 158.263 (0.62064)
            standard deviation: 54.7529 (0.214717)
            kurtosis: 0.745659
            skewness: -1.33707
            entropy: 0.88009
        Image statistics:
          Overall:
            min: 0 (0)
            max: 255 (1)
            mean: 140.552 (0.551185)
            standard deviation: 44.4862 (0.174456)
            kurtosis: 1.62197
            skewness: -1.13626
            entropy: 0.857766
        Rendering intent: Perceptual
        Chromaticity:
          red primary: (0.64,0.33)
          green primary: (0.3,0.6)
          blue primary: (0.15,0.06)
          white point: (0.3127,0.329)
        Background color: white
        Border color: srgb(223,223,223)
        Matte color: grey74
        Transparent color: black
        Interlace: None
        Intensity: Undefined
        Compose: Over
        Page geometry: 1763x1080+0+0
        Dispose: Undefined
        Iterations: 0
        Compression: Undefined
        Orientation: Undefined
        Properties:
          date:create: 2016-02-23T22:39:06-05:00
          date:modify: 2016-02-23T22:39:00-05:00
          signature: 095979ce900d24d683d6a535cde768e82cf497cbb8c78d29fb8b9591ba49e9dd
        Artifacts:
          filename: hippo.bmp
          verbose: true
        Tainted: False
        Filesize: 5.715MB
        Number pixels: 1.904M
        Pixels per second: 952.03GB
        User time: 0.000u
        Elapsed time: 0:01.000
        Version: ImageMagick 6.9.1-10 Q16 x86_64 2015-07-26 http://www.imagemagick.org
      

      Attachments

        1. bmperror.png
          bmperror.png
          35 kB
        2. hippo.bmp
          hippo.bmp
          5.45 MB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wko Woonsan Ko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: