{"action":"opened","issue":{"url":"https://api.github.com/repos/zenphoto/zenphoto/issues/980","labels_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/980/labels{/name}","comments_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/980/comments","events_url":"https://api.github.com/repos/zenphoto/zenphoto/issues/980/events","html_url":"https://github.com/zenphoto/zenphoto/issues/980","id":120379611,"number":980,"title":"Full image does not load when using HTTP server on a different port","user":{"login":"ludgerh","id":16150472,"avatar_url":"https://avatars.githubusercontent.com/u/16150472?v=3","gravatar_id":"","url":"https://api.github.com/users/ludgerh","html_url":"https://github.com/ludgerh","followers_url":"https://api.github.com/users/ludgerh/followers","following_url":"https://api.github.com/users/ludgerh/following{/other_user}","gists_url":"https://api.github.com/users/ludgerh/gists{/gist_id}","starred_url":"https://api.github.com/users/ludgerh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludgerh/subscriptions","organizations_url":"https://api.github.com/users/ludgerh/orgs","repos_url":"https://api.github.com/users/ludgerh/repos","events_url":"https://api.github.com/users/ludgerh/events{/privacy}","received_events_url":"https://api.github.com/users/ludgerh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-04T11:06:30Z","updated_at":"2015-12-04T11:06:30Z","closed_at":null,"body":"Using Zenphoto on a server with different port (like meinserver.de:8080) works fine, except showing the full image by clicking on the reduced image. On my system, I was able to fix that by altering full-image.php starting from line 31:\r\n\r\n/* Prevent hotlinking to the full image from other domains. */\r\nif (getOption('hotlink_protection') && isset($_SERVER['HTTP_REFERER'])) {\r\n\tpreg_match('|(.*)//([^/]*)|', $_SERVER['HTTP_REFERER'], $matches);\r\n\t$checkstring = preg_replace('/^www\\./', '', strtolower($matches[2]));   //this line is new\r\n\tif (strpos($checkstring,\":\")) {$checkstring = substr($checkstring,0,strpos($checkstring,\":\"));};   //this line is new \r\n\tif (preg_replace('/^www\\./', '', strtolower($_SERVER['SERVER_NAME'])) != $checkstring) {   //this line was changed\r\n\t\t/* It seems they are directly requesting the full image. */\r\n\t\theader('Location: ' . FULLWEBPATH . '/index.php?album=' . $album8 . '&image=' . $image8);\r\n\t\texitZP();\r\n\t}\r\n}\r\n"}}