mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
- added confirmation to removing bbcodes
- added optional MX and DNSBL checks - added backtrace (triggering sql error) on error within sql_in_set as well as making sure it is handling an array - let users having f_list access to a forum actually see the forum without a topic list and not displaying an error message - this allows for giving people access to subforums but not the parent forum without the need to add the (sub-)forum to the index. - some additional bugfixes git-svn-id: file:///svn/phpbb/trunk@6414 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -846,6 +846,45 @@ class session
|
||||
return ($banned) ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if ip is blacklisted
|
||||
* This should be called only where absolutly necessary
|
||||
*
|
||||
* Only IPv4 (rbldns does not support AAAA records/IPv6 lookups)
|
||||
*
|
||||
* @author satmd (from the php manual)
|
||||
* @return false if ip is not blacklisted, else an array([checked server], [lookup])
|
||||
*/
|
||||
function check_dnsbl($ip = false)
|
||||
{
|
||||
if ($ip === false)
|
||||
{
|
||||
$ip = $this->ip;
|
||||
}
|
||||
|
||||
$dnsbl_check = array(
|
||||
'bl.spamcop.net' => 'http://spamcop.net/bl.shtml?',
|
||||
'list.dsbl.org' => 'http://dsbl.org/listing?',
|
||||
'sbl-xbl.spamhaus.org' => 'http://www.spamhaus.org/query/bl?ip=',
|
||||
);
|
||||
|
||||
if ($ip)
|
||||
{
|
||||
$quads = explode('.', $ip);
|
||||
$reverse_ip = $quads[3] . '.' . $quads[2] . '.' . $quads[1] . '.' . $quads[0];
|
||||
|
||||
foreach ($dnsbl_check as $dnsbl => $lookup)
|
||||
{
|
||||
if (phpbb_checkdnsrr($reverse_ip . '.' . $dnsbl . '.', 'A') === true)
|
||||
{
|
||||
return array($dnsbl, $lookup . $ip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set/Update a persistent login key
|
||||
*
|
||||
|
Reference in New Issue
Block a user