[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/settings/signer_smime/ -> update.php (source)

   1  <?php // signer_smime => no sanitize here, very sensitive information (paths to certificates)
   2  
   3  if ( isset( MP_AdminPage::$pst_['signer_smime'] ) )
   4  {
   5      $signer_smime = MP_AdminPage::$pst_['signer_smime'];
   6  
   7       $signer_smime['Certificate'] = trim( stripslashes( $signer_smime['Certificate'] ) );
   8       $signer_smime['privateKey']  = trim( stripslashes( $signer_smime['privateKey'] ) );
   9       $signer_smime['Encryption']  = trim( stripslashes( $signer_smime['Encryption'] ) );
  10  
  11      switch ( true )
  12      {
  13          case ( empty( $signer_smime['Certificate'] ) || !is_file( $signer_smime['Certificate'] ) ) :
  14              MP_AdminPage::$err_mess['Certificate'] = __( 'field should be a valid file.', 'MailPress' );
  15          break;
  16          case ( empty( $signer_smime['privateKey'] ) || !is_file( $signer_smime['privateKey'] ) ) :
  17              MP_AdminPage::$err_mess['privateKey'] = __( 'field should be a valid file.', 'MailPress' );
  18          break;
  19          case ( !empty( $signer_smime['Encryption'] ) && !is_file( $signer_smime['Encryption'] ) ) :
  20              MP_AdminPage::$err_mess['Encryption'] = __( 'field should be a valid file.', 'MailPress' );
  21          break;
  22          default :
  23              update_option( MailPress_signer_smime::option_name, $signer_smime );
  24              $message = __( "'SMime' settings saved", 'MailPress' );
  25          break;
  26      }
  27  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1