Plugin Directory

Changeset 2615546


Ignore:
Timestamp:
10/18/2021 05:55:40 AM (4 years ago)
Author:
code9fair
Message:

Fixed bug amount of attacker

Location:
code9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code9/tags/1.0.4/function/code9_anti_brute_foce.php

    r2615542 r2615546  
    2121 
    2222    $NOW['attemp_amount'] = get_option($NOW['attemp_name'], 0);
    23  
    24     if($NOW['attemp_amount'] > 1) {
     23   
     24    $NOW['attemp_amount']++;
     25 
     26    update_option($NOW['attemp_name'], $NOW['attemp_amount']);
     27 
     28    if($NOW['attemp_amount'] > 2) {
    2529      $NOW['capcha1_name'] = 'code9_anti_brute_force_capha[]' . $user . '[]' . $_SERVER['REMOTE_ADDR'] . '[]capcha1';
    2630      $NOW['capcha2_name'] = 'code9_anti_brute_force_capha[]' . $user . '[]' . $_SERVER['REMOTE_ADDR'] . '[]capcha2';
     
    2832      $NOW['caphca1'] = get_option($NOW['capcha1_name'], false);
    2933      $NOW['caphca2'] = get_option($NOW['capcha2_name'], false);
     34     
    3035 
    3136      if(
     
    255260    }
    256261 
    257     $NOW['attemp_amount']++;
    258  
    259     update_option($NOW['attemp_name'], $NOW['attemp_amount']);
    260262 
    261263    unset($NOW);
  • code9/trunk/function/code9_anti_brute_foce.php

    r2615536 r2615546  
    2121 
    2222    $NOW['attemp_amount'] = get_option($NOW['attemp_name'], 0);
    23  
    24     if($NOW['attemp_amount'] > 1) {
     23   
     24    $NOW['attemp_amount']++;
     25 
     26    update_option($NOW['attemp_name'], $NOW['attemp_amount']);
     27 
     28    if($NOW['attemp_amount'] > 2) {
    2529      $NOW['capcha1_name'] = 'code9_anti_brute_force_capha[]' . $user . '[]' . $_SERVER['REMOTE_ADDR'] . '[]capcha1';
    2630      $NOW['capcha2_name'] = 'code9_anti_brute_force_capha[]' . $user . '[]' . $_SERVER['REMOTE_ADDR'] . '[]capcha2';
     
    2832      $NOW['caphca1'] = get_option($NOW['capcha1_name'], false);
    2933      $NOW['caphca2'] = get_option($NOW['capcha2_name'], false);
     34     
    3035 
    3136      if(
     
    255260    }
    256261 
    257     $NOW['attemp_amount']++;
    258  
    259     update_option($NOW['attemp_name'], $NOW['attemp_amount']);
    260262 
    261263    unset($NOW);
Note: See TracChangeset for help on using the changeset viewer.