Skip to content

Commit #e3dc6b0 breaks full size image viewing #22

@Seanst3r

Description

@Seanst3r

Hi. I couldn't view full size images in my gallery. There's a google discussion about it so I'm not alone.

Commit # e3dc6b0 is titled "handle full URL comparison better for proxy access checks"
This is an edit to modules/gallery/controllers/file_proxy.php

Line 49 of the file seems to be the problem.
$compare_uri = url::file(ltrim($request_uri,'/'));

this changes the url being checked
gallery/var/albums/whatever.jpg
into
gallery/gallery/var/albums/whatever.jpg

And then it throws an exception because the path doesn't start with gallery/var

When logged in as an admin I tried to directly access a full size image url and received a gallery page fairly well describing the exception that was thrown.

It's not clear what this commit was meant to fix. Maybe a "proxy access" uses a different request_uri that lacks a leading "gallery/" prefix? Maybe it was only meant to clean up a request with a leading slash. (RewriteBase / )

My solution was to set compare_uri = $request_uri; (or just revert this whole commit)

Regards,
Sean

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions