diff --git a/image-cdn.php b/image-cdn.php index 6e7f382..cd5a0e9 100644 --- a/image-cdn.php +++ b/image-cdn.php @@ -16,14 +16,14 @@ * Requires PHP: 7.4 * Text Domain: image-cdn * License: GPLv2 or later - * Version: 1.2.2 + * Version: 1.2.3 */ // Update this then you update "Requires at least" above! define( 'IMAGE_CDN_MIN_WP', '5.3' ); // Update this when you update the "Version" above! -define( 'IMAGE_CDN_VERSION', '1.2.2' ); +define( 'IMAGE_CDN_VERSION', '1.2.3' ); if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { require_once( __DIR__ . '/vendor/autoload.php' ); diff --git a/imageengine/class-settings.php b/imageengine/class-settings.php index 5dd1e92..4cb7a48 100644 --- a/imageengine/class-settings.php +++ b/imageengine/class-settings.php @@ -425,16 +425,19 @@ public static function register() { if ( ! wp_verify_nonce( $nonce, 'image_cdn_register_nonce' ) || ! current_user_can( 'administrator' ) ) { self::add_error( __( 'Unauthorized', 'image-cdn' ), 'register' ); wp_redirect( add_query_arg( 'register-error', 'Unauthorized', admin_url( '/admin.php?page=image_cdn' ) ) ); + exit; } if ( ! isset( $_POST['register_username'] ) || ! is_email( $_POST['register_username'] ) ) { self::add_error( __( 'Invalid username', 'image-cdn' ), 'register' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } if ( ! isset( $_POST['register_password'] ) ) { self::add_error( __( 'Invalid password', 'image-cdn' ), 'register' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } try { @@ -444,10 +447,12 @@ public static function register() { if ( is_string( $message ) ) { self::add_success( $message ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } } catch ( \Exception $e ) { self::add_error( __( 'An error occurred!', 'image-cdn' ), 'register' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } } @@ -459,16 +464,19 @@ public static function login() { if ( ! wp_verify_nonce( $nonce, 'image_cdn_login_nonce' ) || ! current_user_can( 'administrator' ) ) { self::add_error( __( 'Unauthorized', 'image-cdn' ), 'login' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } if ( ! isset( $_POST['login_username'] ) || ! is_email( $_POST['login_username'] ) ) { self::add_error( __( 'Invalid username', 'image-cdn' ), 'login' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } if ( ! isset( $_POST['login_password'] ) ) { self::add_error( __( 'Invalid password', 'image-cdn' ), 'login' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } try { @@ -478,10 +486,12 @@ public static function login() { if ( is_string( $message ) ) { self::add_success( $message ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } } catch ( \Exception $e ) { self::add_error( __( 'An error occurred!', 'image-cdn' ), 'login' ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } } @@ -493,6 +503,7 @@ public static function logout() { if ( ! wp_verify_nonce( $nonce, 'image_cdn_logout_nonce' ) || ! current_user_can( 'administrator' ) ) { self::add_error( __( 'Unauthorized', 'image-cdn' ) ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } try { @@ -500,9 +511,11 @@ public static function logout() { self::add_success( __("Logged out!", 'image-cdn') ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } catch ( \Exception $e ) { self::add_error( __( 'An error occurred!', 'image-cdn' ) ); wp_redirect( admin_url( '/admin.php?page=image_cdn' ) ); + exit; } } diff --git a/readme.txt b/readme.txt index cf46221..07d34d8 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: imageengine Tags: image cdn, ImageEngine, avif, webp, jpegxl Requires at least: 5.3 -Tested up to: 6.5.5 +Tested up to: 6.6.1 Requires PHP: 7.4 Stable tag: trunk License: GPLv2 or later @@ -91,6 +91,10 @@ The following are the steps to install the Image CDN plugin == Changelog == += 1.2.3 = +* Fixed: Email validation issues +* Tested up to 6.6.1 + = 1.2.2 = * Fixed: Image Engine create subscription, added newer endpoint * Tested up to 6.5.5