You are here

function httpbl_request_whitelist_submit in http:BL 6

Same name and namespace in other branches
  1. 5 httpbl.module \httpbl_request_whitelist_submit()
  2. 6.2 httpbl.module \httpbl_request_whitelist_submit()
  3. 7 httpbl.module \httpbl_request_whitelist_submit()

Grant the session whitelist.

File

./httpbl.module, line 570
Implementation of http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.

Code

function httpbl_request_whitelist_submit($form, &$form_state) {
  $ip = ip_address();
  $iplink = _httpbl_ipdata($ip);
  watchdog('httpbl', 'Session from %ip whitelisted. Reason for block: @reason', array(
    '%ip' => $ip,
    '@reason' => check_plain($form_state['values']['reason']),
  ), WATCHDOG_WARNING, $iplink);
  drupal_set_message(t('The current session has been whitelisted.'));
  $_SESSION['httpbl_status'] = 'white';
  drupal_goto('/');
}