core icon indicating copy to clipboard operation
core copied to clipboard

ResizeImageServlet not working with ?path=

Open cfalzone opened this issue 14 years ago • 6 comments

I have run into several clients with this issue now. The issue is that when you have an image like:

/resize_image?path=/path/to/image.jpg&w=80 it ends up in a 403, even if the image has CMS Anon. Testing in 1.9.5.0 Code, I tracked this down to around Line 210 of the ResizeImageServlet where it is checking permissions.

You do not have the same issue when you use the ?id= instead of ?path=

Here is one example in 1.9.5.0: http://jira.dotmarketing.net/browse/EE-4307 Does not Work: https://www.uakron.edu/resizeimage?path=/test/bradsslides/images/JellyBeans.jpg&maxw=80&maxh=100 Same Image Works: https://www.uakron.edu/resizeimage?id=c565bf91-6737-4472-85fe-7adce43c933f&maxh=80&maxw=100

Here is a Client in 2.0 having the same issue: http://jira.dotmarketing.net/browse/EE-4442

I think the common thread is that they are both MySQL clients, but I am not 100% sure and it might be a coincidence.

I have one client's Database Dump on colo4 to test with.

cfalzone avatar Jun 04 '12 19:06 cfalzone

I should also note that locally I am not able to reproduce the issue. Perhaps an issue only if you upgrade or specific to MySQL, or both?

cfalzone avatar Jun 04 '12 19:06 cfalzone

Daniel this is the same issue as you tested last week with teh db dump on colo4

jtesser avatar Jun 04 '12 19:06 jtesser

Can't reproduce locally as Chris says.

When trying to import the DB on colo4 I am getting this after a while:

C:>mysql -u root -p dotcms < backup.sql Enter password: **** ERROR 1118 (42000) at line 6259: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs

dsilvam avatar Jun 05 '12 02:06 dsilvam

daniel are you sure you are using UTF8? meaning make sure UTF8 is the default encoding for your database when you create it to restore into.

jtesser avatar Jun 05 '12 11:06 jtesser

for the DB restore see the notes here http://jira.dotmarketing.net/browse/DOTCMS-6702

jtesser avatar Jun 06 '12 13:06 jtesser

Closing as ResizeImageServlet is no longer used

wezell avatar Apr 18 '16 15:04 wezell