Plugin Directory

Changeset 1773107


Ignore:
Timestamp:
11/22/2017 12:39:30 PM (8 years ago)
Author:
unloqer
Message:
  • Fixed the login_redirect filter that is being applied to include the current user and the requested redirect url.
  • Fixed an issue with e-mail login when initiating in UNLOQ-only mode from /unloq
Location:
unloq/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • unloq/trunk/autoloader/login/class-login.php

    r1765675 r1773107  
    307307    {
    308308        parse_str($this->utility->rgar($_POST, 'query'), $query);
    309         $redirectTo = apply_filters('login_redirect', $this->utility->rgar($query, 'redirect_to', admin_url('index.php')));
     309        $redirect_to = $this->utility->rgar($query, 'redirect_to', admin_url('index.php'));
     310        $requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
     311        $redirectTo = apply_filters('login_redirect', $redirect_to, $requested_redirect_to, $user);
    310312        if (isset($_SESSION['unloq_enroll_checked'])) {
    311313            unset($_SESSION['unloq_enroll_checked']);
     
    10921094    public function uauth_token_login()
    10931095    {
    1094         if (!isset($_GET['unloq_uauth']) || !isset($_GET['token']) || !strlen($_GET['token'])) return;
    1095         if ($_GET['unloq_uauth'] !== 'login') return;
     1096        if (!isset($_GET['token']) || !strlen($_GET['token'])) return;
    10961097        $token = $_GET['token'];
     1098        if(substr($token, 0, 2) !== 'AU') return;
     1099        if(strlen($token) < 100) return;
    10971100        $isLogged = $this->consume_token($token);
    10981101        if ($isLogged !== true) {
     
    11011104            exit;
    11021105        }
     1106        $user = wp_get_current_user();
    11031107        parse_str($this->utility->rgar($_GET, 'query'), $query);
    1104         $redirect_to = apply_filters('login_redirect', $this->utility->rgar($query, 'redirect_to', admin_url('index.php')));
    1105         wp_redirect($redirect_to);
     1108        $redirect_to = $this->utility->rgar($query, 'redirect_to', admin_url('index.php'));
     1109        $requested_redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '';
     1110        $redirectTo = apply_filters('login_redirect', $redirect_to, $requested_redirect_to, $user);
     1111        wp_redirect($redirectTo);
    11061112        exit;
    11071113    }
  • unloq/trunk/readme.txt

    r1769986 r1773107  
    33Tags: two-factor, two factor, 2 step authentication, 2 factor, 2FA, admin, ios, android, authentication, encryption, iphone, log in, login, mfa, mobile, multi factor, unloq, password, passwordless, phone, secure, security, smartphone, ssl, strong authentication, tfa, two factor authentication, two step, wp-admin, wp-login, authorization
    44Requires at least: 3.5
    5 Requires PHP: 5.6
    6 Tested up to: 4.8.1
     5Requires PHP: 5.5
     6Tested up to: 4.9
    77Stable tag: trunk
    88License: MIT
     
    119119
    120120== Changelog ==
     121= 2.1.19 =
     122* Fixed the login_redirect filter that is being applied to include the current user and the requested redirect url.
     123* Fixed an issue with e-mail login when initiating in UNLOQ-only mode from /unloq
    121124= 2.1.18 =
    122125* Fixed an issue for WordPress sites with PHP <= 5.3
  • unloq/trunk/unloq.php

    r1769986 r1773107  
    33 * Plugin Name:       UNLOQ Authentication
    44 * Description:       Perform UNLOQ.io authentications with the click of a button
    5  * Version:           2.1.18
     5 * Version:           2.1.19
    66 * Author:            UNLOQ.io
    77 * Author URI:        https://unloq.io
     
    1818
    1919define('UQ_PLUGIN', 'unloq');
    20 define('UQ_VERSION', '2.1.18');
     20define('UQ_VERSION', '2.1.19');
    2121define('UQ_VENDORS', plugin_dir_url(__FILE__) . 'vendors');
    2222define('UQ_VENDORS_DIR', plugin_dir_path(__FILE__) . 'vendors');
Note: See TracChangeset for help on using the changeset viewer.