|
@@ 2463-2469 (lines=7) @@
|
| 2460 |
|
$this->config_nooffsitelink_valid_domains[$key] = $clean_domain; |
| 2461 |
|
} |
| 2462 |
|
$parsed_url = phpthumb_functions::ParseURLbetter(@$_SERVER['HTTP_REFERER']); |
| 2463 |
|
if (!$this->OffsiteDomainIsAllowed(@$parsed_url['host'], $this->config_nooffsitelink_valid_domains)) { |
| 2464 |
|
$allow = false; |
| 2465 |
|
//$this->DebugMessage('AntiOffsiteLinking() - "'.@$parsed_url['host'].'" is NOT in $this->config_nooffsitelink_valid_domains ('.implode(';', $this->config_nooffsitelink_valid_domains).')', __FILE__, __LINE__); |
| 2466 |
|
$this->ErrorImage('AntiOffsiteLinking() - "'.@$parsed_url['host'].'" is NOT in $this->config_nooffsitelink_valid_domains ('.implode(';', $this->config_nooffsitelink_valid_domains).')'); |
| 2467 |
|
} else { |
| 2468 |
|
$this->DebugMessage('AntiOffsiteLinking() - "'.@$parsed_url['host'].'" is in $this->config_nooffsitelink_valid_domains ('.implode(';', $this->config_nooffsitelink_valid_domains).')', __FILE__, __LINE__); |
| 2469 |
|
} |
| 2470 |
|
} |
| 2471 |
|
|
| 2472 |
|
if ($allow && $this->config_nohotlink_enabled && preg_match('#^(f|ht)tps?\://#i', $this->src)) { |
|
@@ 2475-2481 (lines=7) @@
|
| 2472 |
|
if ($allow && $this->config_nohotlink_enabled && preg_match('#^(f|ht)tps?\://#i', $this->src)) { |
| 2473 |
|
$parsed_url = phpthumb_functions::ParseURLbetter($this->src); |
| 2474 |
|
//if (!phpthumb_functions::CaseInsensitiveInArray(@$parsed_url['host'], $this->config_nohotlink_valid_domains)) { |
| 2475 |
|
if (!$this->OffsiteDomainIsAllowed(@$parsed_url['host'], $this->config_nohotlink_valid_domains)) { |
| 2476 |
|
// This domain is not allowed |
| 2477 |
|
$allow = false; |
| 2478 |
|
$this->DebugMessage('AntiOffsiteLinking() - "'.$parsed_url['host'].'" is NOT in $this->config_nohotlink_valid_domains ('.implode(';', $this->config_nohotlink_valid_domains).')', __FILE__, __LINE__); |
| 2479 |
|
} else { |
| 2480 |
|
$this->DebugMessage('AntiOffsiteLinking() - "'.$parsed_url['host'].'" is in $this->config_nohotlink_valid_domains ('.implode(';', $this->config_nohotlink_valid_domains).')', __FILE__, __LINE__); |
| 2481 |
|
} |
| 2482 |
|
} |
| 2483 |
|
|
| 2484 |
|
if ($allow) { |