Error on image request #408

Closed
mworrell opened this Issue Sep 12, 2012 · 4 comments

Projects

None yet

3 participants

@mworrell
Zotonic member

In one of our live sites I found the following error:

2012-09-12 16:25:01.950 [error] <0.31126.431>@z_webmachine_error_handler:render_error:33 webmachine error: path="/image/2012/7/16/awid_forum.jpg%28mediaclass-wow-submenu-img.5a8366967f999bb0585464c0d785ef=": 
{error,function_clause,[{z_media_preview,filter2arg,[{mediaclass,{"wow-submenu-img",<<>>}},960,720,[{background,"white"},
{layers,"flatten"},{make_image,"image/jpeg"},{correct_orientation,1},{resize,960,720,false},{crop,none},{colorspace,"RGB"},
{mediaclass,{"wow-submenu-img",<<>>}},sharpen_small]]},{z_media_preview,'-cmd_args/3-fun-0-',3},{lists,foldl,3},
{z_media_preview,cmd_args,3},{z_media_preview,convert_1,5},{resource_file_readonly,ensure_preview,2},
{resource_file_readonly,service_available,2},{webmachine_resource,resource_call,3}]}
@mworrell mworrell was assigned Sep 12, 2012
@arjan
Zotonic member

How often does this occur?

@mworrell
Zotonic member

Am not sure. Maybe it happens when the mediaclass is unknown (and the url is accepted).

@mworrell
Zotonic member

It happens quite regularly, but every time the urls are strange.
Maybe a broken crawler:

path="/image/2012/6/16/l1020076.jpg%28mediaclass-wow-submenu-img.5a8366967f999bb0585464c0d7855%3C!DOCTYPE%20html%3E%3Chtml%20lang="

path="/image/2012/6/16/l1020076.jpg(mediaclass-wow-submenu-o"

path="/image/2012/6/16/l1020076.jpg%28mediaclass-wow-submenu-img.5a8366967f999bb0585464c0d7855%3C!DOCTYPE%20html%3E%3Chtml%20lang="

path="/image/2012/6/16/l1020076.jpg(mediaclass-wow-submenu-o"

It is ok to crash on this - but maybe we should generate a 404 instead.

Closing this, as it is clearly a non standard request.

@mworrell mworrell closed this Sep 4, 2013
@kaos
Zotonic member

I think it would be a nice policy to never crash based on invalid requests, no matter how crazy.. +1 for four-o-four :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment