You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kamal Bhatt <kb...@tt.com.au> on 2006/07/27 07:44:59 UTC

Imageop - type selection

Hi
I have noticed something curious about imageop. We allow our clients to 
enter images into our system. Now, and we know this is bad design, they 
are allowed to enter images with incorrect suffixes or no suffix. One 
image had a suffix of JPG but turned out to be BMP. This caused imageop 
to crash and burn. If we removed the suffix, it seems to work. Two 
questions, is this default behaviour (ie, if no suffix is given assume 
BMP) or is there some clever decision made about what file format it is? 
If this is the case that there is some clever processing occuring, how 
can I get this behaviour all the time (ie ignore the suffix)? I have 
looked at the code and I am obviously missing something because I do not 
see logic for this.

Cheers.

-- 
Kamal Bhatt


--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Imageop - type selection

Posted by Kamal Bhatt <kb...@tt.com.au>.
Antonio Gallardo wrote:
>
>>
> If you don't want to rely on file suffixes a possible solution is to 
> set a different file suffix as .img .
>
But is it there a way to get imageop not rely on suffixes at all? It 
would be some effort to rename all the files as .img as they are 
referenced in a database.

-- 
Kamal Bhatt


--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Imageop - type selection

Posted by Antonio Gallardo <ag...@agssa.net>.
Kamal Bhatt escribió:
>
> Hi
> I have noticed something curious about imageop. We allow our clients 
> to enter images into our system. Now, and we know this is bad design, 
> they are allowed to enter images with incorrect suffixes or no suffix. 
> One image had a suffix of JPG but turned out to be BMP. This caused 
> imageop to crash and burn. If we removed the suffix, it seems to work. 
> Two questions, is this default behaviour (ie, if no suffix is given 
> assume BMP) or is there some clever decision made about what file 
> format it is? If this is the case that there is some clever processing 
> occuring, how can I get this behaviour all the time (ie ignore the 
> suffix)? I have looked at the code and I am obviously missing 
> something because I do not see logic for this.
>
> Cheers.
>
If you don't want to rely on file suffixes a possible solution is to set 
a different file suffix as .img .

Best Regards,

Antonio Gallardo.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org