Plugin Directory

Changeset 2895877


Ignore:
Timestamp:
04/08/2023 09:28:22 AM (3 years ago)
Author:
senpaisoftware
Message:

Add Version 1.0.1
Bug Fix: Fixed an issue where an admin couldn't change another user's settings.
Misc: Replaced wp_hash with sha1.

Location:
senpai-software-2fa
Files:
19 added
4 edited

Legend:

Unmodified
Added
Removed
  • senpai-software-2fa/trunk/admin/senpai-software-2fa-admin.php

    r2885026 r2895877  
    1717 * Display user profile fields.
    1818 */
    19 function senpai_software_2fa_profile_fields(){
     19function senpai_software_2fa_profile_fields($user){
    2020
    21     $user_id = get_current_user_id();
     21    $user_id = $user->ID;
    2222    $hash = get_user_meta($user_id, 'senpai_software_2fa_hash', true);
    2323    $status = get_user_meta($user_id, 'senpai_software_2fa_status', true);
     
    103103
    104104        if ( preg_match( '/^[a-f0-9]{40}$/', $file_hash ) ) { // Validated
    105             $file_hash=wp_hash($file_hash);
     105            $file_hash=sha1($file_hash);
    106106            update_user_meta($user_id, 'senpai_software_2fa_hash', $file_hash);
    107107        }
  • senpai-software-2fa/trunk/readme.txt

    r2889880 r2895877  
    5656== Changelog ==
    5757
     58= 1.0.1 =
     59* Bug Fix: Fixed an issue where an admin couldn't change another user's settings.
     60* Misc: Replaced wp_hash with sha1.
     61
    5862= 1.0 =
    5963* Release this plugin to the masses!
     
    6165== Upgrade Notice ==
    6266
    63 Upgrade normally
     67Disable authentication before update 1.0.1. After updating the plugin, update your key file.
  • senpai-software-2fa/trunk/senpai-software-2fa-core.php

    r2885026 r2895877  
    4848            if ( preg_match( '/^[a-f0-9]{40}$/', $file_hash ) ) { // Validated
    4949
    50                 $file_hash=wp_hash($file_hash);
     50                $file_hash=sha1($file_hash);
    5151
    5252                if ($db_hash !== $file_hash) {
  • senpai-software-2fa/trunk/senpai-software-2fa.php

    r2885026 r2895877  
    22/**
    33 * Plugin Name:       Senpai Software - Two-factor authentication (2FA) with a key file
    4  * Plugin URI:        https://senpai.software/plugins/2fa
     4 * Plugin URI:        https://senpai.software/wp-plugins/2fa/
    55 * Description:       You can select any file on your computer and use it as a secret key to log into the admin area. This way you will get maximum protection against brute force attacks.
    66 * Version:           1.0.0
Note: See TracChangeset for help on using the changeset viewer.