OK, I'm having a problem with BG not displaying thumbnails. I believe that it is because of my multisite setup, but perhaps not. I am running this site as a subsite, in a subdirectory, on port 7120, on WinIIS. (See example URLs below for clarification.) Instead of using a symlink for the subdirectory (Win doesn't support true symlinks), we use a virtual directory pointed back to the root Drupal directory.

First, let me say that I think brilliant_gallery.module (5.x-2.17) needs to be emended. On lines 267 and 344, it attempts to modify "non-clean" URLs so that the file path will come out right. Well and good, but I think the function needs to look for and remove "index.php?q=" first, and then "?q=". No? Because when I made that change, at least the links to my full-size images came right.

Here is a sample of the output I get, having made that change:

<a href="http://www.example.com:7120/secondsite/files/albums/albumA/image.jpg" class="thickbox" rel="img_1234567" title="title"><img style="display: block;border:0" src="http://www.example.com:7120/secondsite/sites/7120.www.example.com.secondsite/modules/brilliant_gallery/image.php?imgp=RTpcRHJ1cGFsU2l0ZXNcVGVzdFxmaWxlc1xhbGJ1bXNcYWxidW1BL2ltYWdlLmpwZw&imgw=150&imgh=113" /></a>

$imgp decoded is "E:\DrupalSites\Test\files\albums\albumA/image.jpg," which is, in fact, the location of the image (if you ignore the fact that the last slash is a forward slash).

http://www.example.com:7120/secondsite/files/albums/albumA/image.jpg resolves properly (as does http://www.example.com:7120/files/albums/albumA/image.jpg).
http://www.example.com:7120/secondsite/sites/7120.www.example.com.second... resolves to the page (image.php), but the script does not process successfully.

First problem is encountered at line 4, where the script checks for a colon in the filepath and aborts if it finds one. I don't understand why that's necessary but, in my case, obviously, the whole show grinds to a halt right there.

Even if I comment that bit out, though, I still have no luck.

I'm hoping that the information I've provided here will be enough for a diagnosis, but I would be happy to dig further and supply more if need be. I really like the module when it works...

Comments

zbricoleur’s picture

Category: bug » support

Well, I got it to work. The problem was the path, all right: "E:\DrupalSites\Test\files\albums\albumA/image.jpg" After I lopped off the "E:" and turned the backslashes around, it fired right up. Must be something about PHP path functions differing on Windows? I dunno...

The file caching seems to be working, too.

I would still like to know what the danger is with file paths containing a colon, since I had to leave the part of the script that checks for that disabled.

vacilando’s picture

Version: 5.x-2.17 » 5.x-2.0-dev
Status: Active » Fixed

Colon was assumed to indicate an URL injection - that's why. This has been fixed now - see http://drupal.org/node/186863#comment-752115

zbricoleur’s picture

Many thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.