2012-02-14 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: fixed function "check_refererer" when the http server run in other port instead the normally 80 port. Fixes: #3452474 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5591 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d64617aa5b
commit
f94a0cbd2b
|
@ -1,3 +1,10 @@
|
||||||
|
2012-02-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions.php: fixed function "check_refererer" when the http
|
||||||
|
server run in other port instead the normally 80 port.
|
||||||
|
|
||||||
|
Fixes: #3452474
|
||||||
|
|
||||||
2012-02-14 Sancho Lerena <slerena@artica.es>
|
2012-02-14 Sancho Lerena <slerena@artica.es>
|
||||||
|
|
||||||
* include/config_process.php: updated build & version.
|
* include/config_process.php: updated build & version.
|
||||||
|
|
|
@ -67,7 +67,13 @@ function check_refererer() {
|
||||||
if ($config['https']) {
|
if ($config['https']) {
|
||||||
$url = 'https://';
|
$url = 'https://';
|
||||||
}
|
}
|
||||||
$url .= $_SERVER['SERVER_NAME'] . $config["homeurl"];
|
//Check if the referer have a port (for example when apache run in other port to 80)
|
||||||
|
if (preg_match('/http(s?):\/\/.*:[0-9]*/', $referer) == 1) {
|
||||||
|
$url .= $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $config["homeurl"];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$url .= $_SERVER['SERVER_NAME'] . $config["homeurl"];
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($referer, $url) === 0) {
|
if (strpos($referer, $url) === 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue