You are here

function seckit_admin_form_submit in Security Kit 6

Same name and namespace in other branches
  1. 7 includes/seckit.form.inc \seckit_admin_form_submit()

Submits form.

1 string reference to 'seckit_admin_form_submit'
seckit_admin_form in includes/seckit.form.inc
Forms administration page.

File

includes/seckit.form.inc, line 430
Administrative interface for SecKit settings.

Code

function seckit_admin_form_submit($form, &$form_state) {
  $from_origin_enable = $form_state['values']['seckit_various']['from_origin'];
  $x_content_type_options_enable = $form_state['values']['seckit_xss']['x_content_type']['checkbox'];
  $file_system = variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC);
  if ($from_origin_enable && $file_system == FILE_DOWNLOADS_PUBLIC) {
    $msg = 'From-Origin HTTP response header will not be served for files because of public file system. It is recommended to enable private file system to ensure provided by From-Origin security.';
    drupal_set_message($msg, 'warning');
  }
  if ($x_content_type_options_enable && $file_system == FILE_DOWNLOADS_PUBLIC) {
    $msg = 'X-Content-Type-Options HTTP response header will not be served for files because of public file system. It is recommended to enable private file system to ensure provided by X-Content-Type-Options security.';
    drupal_set_message($msg, 'warning');
  }
}