X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FImage.pm;h=d1743b41d5c456428e4ce78cf0a19e803f0ff065;hp=e436428950b6adc9d5a8e56e23755d3eab4ae710;hb=6be9a26e71fc85e69cbbdbc95fc50d3569050921;hpb=c418c8bb8654b7aa1ea16357fe259ef65022cab8 diff --git a/perl/Sesse/pr0n/Image.pm b/perl/Sesse/pr0n/Image.pm index e436428..d1743b4 100644 --- a/perl/Sesse/pr0n/Image.pm +++ b/perl/Sesse/pr0n/Image.pm @@ -46,8 +46,8 @@ sub handler { # or error($r, "Could not find $event", 404, "File not found"); # Look it up in the database - my $ref = $dbh->selectrow_hashref('SELECT id,width,height FROM images WHERE event=? AND filename=?', - undef, $event, $filename); + my $ref = $dbh->selectrow_hashref('SELECT id,width,height FROM images WHERE event=? AND vhost=? AND filename=?', + undef, $event, $r->get_server_name, $filename); error($r, "Could not find $event/$filename", 404, "File not found") unless (defined($ref)); $id = $ref->{'id'};