function _httpbl_whitelisted in http:BL 6
Same name and namespace in other branches
- 5 httpbl.module \_httpbl_whitelisted()
- 6.2 httpbl.module \_httpbl_whitelisted()
- 7 httpbl.module \_httpbl_whitelisted()
Check if an IP is whitelisted through the access table or a session whitelist.
1 call to _httpbl_whitelisted()
- httpbl_check in ./
httpbl.module - Check if an IP should be banned
File
- ./
httpbl.module, line 647 - Implementation of http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.
Code
function _httpbl_whitelisted($ip) {
return isset($_SESSION['httpbl_status']) && $_SESSION['httpbl_status'] == 'white' || db_result(db_query_range("SELECT status FROM {access} WHERE type = 'host' AND LOWER('%s') LIKE LOWER(mask) ORDER BY status DESC", $ip, 0, 1)) == '1';
}