News:

"The phone is a remarkably complex, simple device,
and very rarely ever needs repairs, once you fix them." - Dan/Panther

Main Menu

Posting Photos on CRPF

Started by DavePEI, February 20, 2013, 05:46:25 AM

Previous topic - Next topic

NorthernElectric

#30
Quote from: WEBellSystemChristian on May 12, 2015, 09:58:47 AMSince both of you completely lost me at the word "Meta", it won't help many of us understand what you're discussing.

Simply put, metadata is information embedded in the image file that is not part of the image itself.  Typical metadata will include information about the camera and it's settings used to take the photo.  It can also include the latitude and longtitude where the photo was taken if from a GPS-enabled device, copyright information, etc.  It can also contain html and/or php code (2 languages used to write web pages).  This, I believe, is the main reason for the security checks as some web software has vulnerabilities that will execute such embedded code.

Hackers can and have added malicious code into image files.  It's possible that some cameras and/or imaging software may put benign html into their metadata, and these are being rejected by the security checks.
Cliff

unbeldi

Quote from: dsk on May 12, 2015, 12:28:03 PM
Tried to post pictures re-sized to max length/with (the greatest side) to 1000PX 45 PX/inch.
Works, but is it permanent or just luck????

dsk
Only examination of the remaining meta information in the image after each image alteration can answer that.

One solution of course is to always strip meta data from images and the forum configuration software has such an option. But this has very detrimental effects on image types that require certain meta data, such as animated GIF images. The animation is encoded as meta data and the image would be broken, if removed.

Security is an issue always relative to the environment against which it is assessed. This is a very closed community, every one must register and be approved by an actual person to post and the trustworthiness of everyone here has never, afaik, been questioned. We are also not running rogue code, or untested third party forum extensions, so the environment is in every aspect very controlled.

Therefore, I would encourage to simply remove the "security" check code from execution.

The only danger in this appears that when some one grabs an image from some website out there and posts it on the forum. It could be infected with some crafted exploit, and someone could subsequently download it and experience problems on their computer.  I don't think I ever upload images from third party sites, not even eBay, without first rewriting them in one of my image editors. Ebay images appear safe to me, though, as eBay processes them internally with the ImageMagick API (if I recall correctly), and inserts their own meta data.


NorthernElectric

Quote from: unbeldi on May 12, 2015, 01:02:20 PM...I would encourage to simply remove the "security" check code from execution.

The only danger in this appears that when some one grabs an image from some website out there and posts it on the forum. It could be infected with some crafted exploit, and someone could subsequently download it and experience problems on their computer.  I don't think I ever upload images from third party sites, not even eBay, without first rewriting them in one of my image editors. Ebay images appear safe to me, though, as eBay processes them internally with the ImageMagick API (if I recall correctly), and inserts their own meta data.

Even if eBay sanitizes uploaded images, many sellers use externally hosted images, eg. auctiva, inkfrog, etc.  Do we extend our trust to any site that may contain an image linked to by an IMG tag on an eBay page?  As an alternative to turning off image security checks on this forum, has this (from SMF 2.0 Online Manual: Attachments and Avatars) been tried?

Cliff

DavePEI

#33
I agree it might be worthwhile removing the security check for a trial period, perhaps re-encoding as a precaution. If that solves the problem, then maybe we can move on. The loss of animated GIFs wouldn't be a big deal for the majority of users.

Dave
The Telephone Museum of Prince Edward Island:
http://www.islandregister.com/phones/museum.html
Free Admission - Call (902) 651-2762 to arrange a visit!
C*NET 1-651-0001

unbeldi

Quote from: NorthernElectric on May 12, 2015, 03:03:48 PM
Quote from: unbeldi on May 12, 2015, 01:02:20 PM...I would encourage to simply remove the "security" check code from execution.

The only danger in this appears that when some one grabs an image from some website out there and posts it on the forum. It could be infected with some crafted exploit, and someone could subsequently download it and experience problems on their computer.  I don't think I ever upload images from third party sites, not even eBay, without first rewriting them in one of my image editors. Ebay images appear safe to me, though, as eBay processes them internally with the ImageMagick API (if I recall correctly), and inserts their own meta data.

Even if eBay sanitizes uploaded images, many sellers use externally hosted images, eg. auctiva, inkfrog, etc.  Do we extend our trust to any site that may contain an image linked to by an IMG tag on an eBay page?  As an alternative to turning off image security checks on this forum, has this (from SMF 2.0 Online Manual: Attachments and Avatars) been tried?

The option you are citing is in fact is the option I mentioned earlier, and no, it has not been tried. I don't actually encourage that either for the reason I stated.

Basically, the "security" check in SMF is very poor, IMHO, extremely basic. For software that is as frequently used as SMF, I would expect more sophistication. Lacking that, these "features" become bugs.


stub

 unbeldi,
            Tried to post pic today, that I have posted in the past, and I can't pass security check either. What's up.  stub
Kenneth Stubblefield

unbeldi

Quote from: stub on August 23, 2015, 07:04:58 PM
unbeldi,
            Tried to post pic today, that I have posted in the past, and I can't pass security check either. What's up.  stub

I don't know.  The exact same unmodified image?
JPEG images can be tricky, thinking about it, because when decoded they can be different every time, because the lossy compression forces slight changes.  I have not investigated that. 

stub

 unbeldi,
             The pic I tried to post was the AE cradle in black before I ran it thru the bead blaster. stub
Kenneth Stubblefield

andre_janew

JPEG images and small pictures work for me!

andy1702

OK guys, I'm still having the 'failed security checks' thing.

Being quite new here, I'm just wondering why a JPG image needs to go through any kind of security check? I've never known this on any forum before and I've been on (and even run) quite a few. If security is so tight you can't do anything, what's the point of having the forum in the first place? I'm not sure what software is being used here, but I'd suggest PHPBB. It allows you to post images of any size straight to it and even place them between different areas of text in your post.

I find having to resize images a real hassle and even when I've done that I still can't get them to upload. I'd say remove the security checks because they obviously don't work as they should.
Call me on C*net 0246 81 290 from the UK
or (+44) 246 81 290 from the rest of the world.

For telephone videos search Andys Shed on Youtube.

Greg G.

Quote from: andy1702 on October 29, 2016, 02:15:55 PM
OK guys, I'm still having the 'failed security checks' thing.

Being quite new here, I'm just wondering why a JPG image needs to go through any kind of security check? I've never known this on any forum before and I've been on (and even run) quite a few. If security is so tight you can't do anything, what's the point of having the forum in the first place? I'm not sure what software is being used here, but I'd suggest PHPBB. It allows you to post images of any size straight to it and even place them between different areas of text in your post.

I find having to resize images a real hassle and even when I've done that I still can't get them to upload. I'd say remove the security checks because they obviously don't work as they should.

What program are you using to resize them?  I use LView Pro, but even with Paint (which I never use) I didn't have much trouble figuring out how to resize them.  I usually resize my pics ("my pics" being pictures I've taken myself) to 1/3 of the original size for uploading.  In both programs you have the option to choose a percentage, and in my case I usually choose 33.33% of the original, depending on the pic.
The idea that a four-year degree is the only path to worthwhile knowledge is insane.
- Mike Row
e

Pourme

I use the resizer built into windows. Rt click and choose edit, follow the prompts...easy
Benny

Panasonic 308/616 Magicjack service

andy1702

I don't run Windows on any of my computers any more. Everything here has been using various flavours of Linux for the last 5 or 6 years and I've never run across this problem with images on any forum before. I edited the images in question on a desktop running Linux Mint 17.1 and used the widely know open source GIMP software. Images were in landscape format and resized to 1000 pixels on the longest edge, which made them both around 250kb, so well within the limits the forum is supposed to accept.
Call me on C*net 0246 81 290 from the UK
or (+44) 246 81 290 from the rest of the world.

For telephone videos search Andys Shed on Youtube.

unbeldi

#43
The problem is actually well understood and is a bug (not officially, of course) in Simple Machines Forum.  The "security" check is so primitive that it flags any image that happens to have the right bit sequence to mach a list of "forbidden" words or tags that could be used in malicious embedded code.  Problem is that the tags are commonly used also in meta information that is harmless, and even beneficial, or even necessary.

I posted a short computer program here in another thread that can be used to identify those images, using the exact algorithm, the same code snippet, that the forum software uses.  It could easily be completely disabled.

===========================

EDIT:  The above linked program can also be found in this 3 page topic about this issue.

http://www.classicrotaryphones.com/forum/index.php?topic=14032.0

unbeldi

So, based on what I said, the problem is not the size of the picture, within reason, but the data.  A resized image could well have more or fewer offending bit sequences.
What is important in resizing, is that the image data is actually resampled in the process, rather than just cropped or extracted in some fashion without alteration of the critical area.  And if it is the EXIF or other other meta information, it may well be always inserted with the software used.  I created a special menu shortcut in my finder app to clean an image from all meta information using a Unix program, exiftool.  But this also cleans out the image size meta information, so I always have to reset the DPI parameter to what it was before.