Image upload failed because the extension of this file did not match the content.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naszeaudio
    Member
    • Jun 2016
    • 73
    • 5.2.x

    Image upload failed because the extension of this file did not match the content.

    Simple photo from Samsung edge s6. Windows paint can open it, but vbulletin forum will always say 'Image upload failed because the extension of this file did not match the content.'

    Extension is jpg, but filetype jpeg. Sure, but hey that not rocket science for software to try Jpeg when extension is jpg, right? How to force vbulletin to do it?
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74132

    #2
    There is no way around this. It is triggering a security feature. Some browsers will interpret the contents of the file as they are, not as they should be. People can place javascript and other code within image files.

    What you're encountering sounds like a bug and a JPEG image with a JPG extension should be recognized. I suggest opening a JIRA for this issue. You can do so here:
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • naszeaudio
      Member
      • Jun 2016
      • 73
      • 5.2.x

      #3
      Wayne, done. Thanks

      I am surprised no one picked this one up. Showstopper. Makes my users think 'a jpg problem? if this do not work, what kind of forum is that?'

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24287
        • 6.0.X

        #4
        I disagree that it's a showstopper, but it should be looked at.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • Jin-Soo Jo
          vBulletin Developer
          • Sep 2012
          • 1040
          • 5.5.x

          #5
          naszeaudio If at all possible, could you upload the image file that's having the issue to that JIRA?

          Edit: Here's the JIRA link for reference: http://tracker.vbulletin.com/browse/VBV-16320

          Comment

          • Jin-Soo Jo
            vBulletin Developer
            • Sep 2012
            • 1040
            • 5.5.x

            #6
            Also is the forum in question using GD or ImageMagick? You can check by going to admincp > Settings > Options > "Image Setings" > "Image Processing Library"

            Comment

            • zuendy
              New Member
              • Jul 2011
              • 10
              • 5.2.x

              #7
              I think I have a similar problem.
              Hi guys, sorry for my bad english. I have some trouble with this jpgs from my DSLR camera, via VB4 works upload without problems. But via VB5 it doesn't work. I get this "Invalid file data
              RCSKY.de | Final-RC.de

              Comment

              • Jeanius!
                Member
                • May 2016
                • 87
                • 5.2.x

                #8
                I have the same problem too.

                Comment

                • Jin-Soo Jo
                  vBulletin Developer
                  • Sep 2012
                  • 1040
                  • 5.5.x

                  #9
                  zuendy Thanks for the file in the other thread. I'll take a look at what's going on with it as soon as possible next week.

                  Comment

                  • naszeaudio
                    Member
                    • Jun 2016
                    • 73
                    • 5.2.x

                    #10
                    Sorry guys for delay. We are using GD at the moment (as apple product users says it works better for them than imagemagick).

                    I understand u have sample file already.

                    Comment

                    • Kevin Sours
                      Lead Developer
                      • Apr 2008
                      • 601
                      • 5.5.x

                      #11
                      We're still looking into this. My apologies for the delay. The core issue is that the file in question is tripping some security checks we have in place. The root issue is that it's relatively easy to create a completely valid image that will execute PHP code if you can convince the system to treat it as a PHP file. Unfortunately the image standards have a lot of essentially undefined sections that various cameras do some strange things with, so sorting out what a valid image looks like isn't as easy as it should be. So we need to tweak the checks to accept a wider variety of (legitimate) images, but I hope you understand why we're moving carefully on this. We think we've worked out a process that will greatly improve things.

                      We do have a sample image, but we could use a few more to make sure that there isn't anything out there we haven't accounted for (there probably is -- I expect this to be a iterative process)
                      Kevin

                      Comment

                      • amart79196
                        New Member
                        • Apr 2015
                        • 26
                        • 5.1.x

                        #12
                        Just to report, this problem is also in the latest version, 5.2.4 as well.

                        1. Is there any viable workaround to get an image posted?
                        2. Can we expect this to be fixed in the next release?

                        Comment

                        • Trevor Hannant
                          vBulletin Support
                          • Aug 2002
                          • 24358
                          • 5.7.X

                          #13
                          Originally posted by amart79196
                          Just to report, this problem is also in the latest version, 5.2.4 as well.

                          1. Is there any viable workaround to get an image posted?
                          2. Can we expect this to be fixed in the next release?
                          1. Not at this time
                          2. Depends on whether people provide images that have been causing issues so that they can look into these and work to resolve the issue. The more sample images that have been causing issues, the more likely the developers will be able to resolve this!

                          Please attach any images that are flagging up the same message to the Bug Report, NOT here:

                          Vote for:

                          - Admin Settable Paid Subscription Reminder Timeframe (vB6)
                          - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

                          Comment

                          • amart79196
                            New Member
                            • Apr 2015
                            • 26
                            • 5.1.x

                            #14
                            I just uploaded this file to the bug tracker.

                            Comment

                            • Wayne Luke
                              vBulletin Technical Support Lead
                              • Aug 2000
                              • 74132

                              #15
                              We're applying a fix for this in 5.2.5. Basically, if all the other security checks pass, the image will have its metadata stripped be rewritten as a valid JPEG file. This should help workaround phones and cameras that can't follow standards.
                              Translations provided by Google.

                              Wayne Luke
                              The Rabid Badger - a vBulletin Cloud demonstration site.
                              vBulletin 5 API

                              Comment

                              Related Topics

                              Collapse

                              Working...