Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 115002

Summary: Image upload gives no warning for non-existent files
Product: [Retired] Red Hat Enterprise CMS Reporter: Jon Orris <jorris>
Component: content typesAssignee: Scott Seago <sseago>
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-02-10 22:35:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 113496    

Description Jon Orris 2004-02-05 13:38:16 UTC
Description of problem:
@40079

If one enters the path to an image in the upload form instead of
browsing for it, the system gives no warning if the image does not
exist.  An 'image' with unknown width and length will be created.

The stack trace below is from the MultiPart article image upload. It's
a report of the IOException that occurs when the image is empty. Note
that this warning doesn't appear for, say, Article image uploading.
This means three things:

1) An exception is likely being hidden, or
2) The error is detected by this code, but not reported to the user
3) There's different sets of code doing the same thing


2004-02-04 12:27:48,820 [0][3]] ERROR cms.ImageAsset - IOException
guessing file size
java.io.EOFException
	at java.io.DataInputStream.readByte(DataInputStream.java:333)
	at
com.arsdigita.mimetypes.image.JPEGImageSizer.firstMarker(JPEGImageSizer.java:144)
	at
com.arsdigita.mimetypes.image.JPEGImageSizer.scanHeader(JPEGImageSizer.java:285)
	at
com.arsdigita.mimetypes.image.JPEGImageSizer.computeSize(JPEGImageSizer.java:90)
	at
com.arsdigita.mimetypes.image.ImageSizer.computeImageSize(ImageSizer.java:82)
	at com.arsdigita.cms.ImageAsset.guessSize(ImageAsset.java:215)
	at com.arsdigita.cms.ImageAsset.loadFromFile(ImageAsset.java:162)
	at
com.arsdigita.cms.contenttypes.ui.mparticle.ImageUploadSection.processImageUpload(ImageUploadSection.java:156)
	at
com.arsdigita.cms.contenttypes.ui.mparticle.SectionEditForm$SectionProcessListener.process(SectionEditForm.java:305)

Comment 1 Scott Seago 2004-02-09 21:55:57 UTC
Fixed @40214. By default, FileUpload widget now adds a validation
listener to check for non-empty file upload.