byrnereese / mt-plugin-imagecropper

A Movable Type plugin to assist in the generation of a set array of thumbnails conforming to size requirements defined by the user.
13 stars 5 forks source link

Invalid url being created for cropped asset #3

Open joelcollinsdc opened 14 years ago

joelcollinsdc commented 14 years ago

In our environment (windows), cropped asset urls contain backslashes instead of forward slashes. Our web server security settings prevent these urls from being accessed.

I added this: $cropped_url =~ s/\/\//g; at approx line 518 of Plugin.pm, but this is highly untested.

byrnereese commented 14 years ago

Really? A backslash is the Internet standard. Are you sure? Can you include an example URL that your web server won't "process?"

joelcollinsdc commented 14 years ago

maybe i'm getting my slash / backslash terminology confused.

the urls looked like this: http://oursite.dov/ourblog/\assets_c\2009\10\blah.jpg

joelcollinsdc commented 14 years ago

we have urlscan enabled on our windows servers which prevents the \ in a url. it worked fine on our test servers where this wasn't enabled but as soon as we deployed to production which is a little more hardeend the urlscan caught it.

byrnereese commented 14 years ago

I just committed 1.0.8 which should hopefully address this issue. Thanks for the bug report. Please do me the favor of testing to make sure this works and by letting me know! I will leave it to you to close the ticket if it works. Thanks!