Skip to content

Commit

Permalink
Release v3.14.4.2 (PR #6109)
Browse files Browse the repository at this point in the history
Release v3.14.4.2
  • Loading branch information
engahmeds3ed authored Aug 17, 2023
2 parents 59d1761 + 68b2aa2 commit a38a540
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 105 deletions.
34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

39 changes: 0 additions & 39 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Check out our [support page](https://wp-rocket.me/support/?utm_source=github&utm

### Reporting Security Bugs

Please report security bugs found in the site-reviews plugin's source code through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-rocket). The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.
You can report any security bugs found in the source code of the site-reviews plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-rocket). The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.

## Contributions

Expand Down
6 changes: 6 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Security Policy

## Reporting Security Bugs

Please report security bugs found in the site-reviews plugin's source code through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/wp-rocket). The Patchstack team will assist you with verification, CVE assignment and take care of notifying the developers of this plugin.
---
15 changes: 7 additions & 8 deletions inc/Engine/Admin/DomainChange/Subscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,20 @@ public function maybe_launch_domain_changed() {
return;
}

$base_url = trailingslashit( home_url() );
$base_url_encoded = base64_encode( $base_url ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$base_url = trailingslashit( get_option( 'home' ) );
$base_url_encoded = base64_encode( $base_url ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$last_base_url_encoded = get_option( self::LAST_BASE_URL_OPTION );

if ( ! get_option( self::LAST_BASE_URL_OPTION ) ) {
update_option( self::LAST_BASE_URL_OPTION, $base_url_encoded );
if ( ! $last_base_url_encoded ) {
update_option( self::LAST_BASE_URL_OPTION, $base_url_encoded, true );
return;
}

$last_base_url_encoded = get_option( self::LAST_BASE_URL_OPTION );

if ( $base_url_encoded === $last_base_url_encoded ) {
return;
}

update_option( self::LAST_BASE_URL_OPTION, $base_url_encoded );
update_option( self::LAST_BASE_URL_OPTION, $base_url_encoded, true );

$last_base_url = base64_decode( $last_base_url_encoded ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode

Expand Down Expand Up @@ -194,7 +193,7 @@ public function regenerate_configuration() {
}

$last_base_url = base64_decode( $last_base_url_encoded ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
$base_url = trailingslashit( home_url() );
$base_url = trailingslashit( get_option( 'home' ) );

/**
* Fires when the domain of the website has been changed and user clicked on notice.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@ protected function set_up()
public function testShouldDoAsExpected($config, $expected) {
Functions\when('trailingslashit')->returnArg();
Functions\when('rocket_get_constant')->returnArg(2);
Functions\expect('home_url')->andReturn($config['base_url']);
Functions\expect('get_option')->with(Subscriber::LAST_BASE_URL_OPTION)->andReturn($config['last_base_url']);
Functions\expect('get_option')->andReturnUsing(function( $option ) use ( $config ) {
switch ( $option ) {
case Subscriber::LAST_BASE_URL_OPTION:
return $config['last_base_url'];

case 'home':
return $config['base_url'];
}
});

if(!$config['ajax_request'] && ($config['is_base_url_different'] || ! $config['base_url_exist'])) {
Functions\expect('update_option')->with(Subscriber::LAST_BASE_URL_OPTION, $expected['encrypted_old_url']);
Functions\expect('update_option')->with(Subscriber::LAST_BASE_URL_OPTION, $expected['encrypted_old_url'], true);
}

Functions\expect('wp_doing_ajax')->once()->andReturn( $config['ajax_request'] );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function set_up() {
*/
public function testShouldDoAsExpected( $config, $expected )
{
Functions\when('home_url')->justReturn($config['home_url']);
Functions\expect('get_option')->with('home')->andReturn($config['home_url']);
Functions\when('trailingslashit')->returnArg();

$this->ajax_handler->expects()->validate_referer('rocket_regenerate_configuration', 'rocket_manage_options')->andReturn($config['is_validated']);
Expand Down
4 changes: 2 additions & 2 deletions wp-rocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP Rocket
* Plugin URI: https://wp-rocket.me
* Description: The best WordPress performance plugin.
* Version: 3.14.4.1
* Version: 3.14.4.2
* Requires at least: 5.8
* Requires PHP: 7.3
* Code Name: Iego
Expand All @@ -20,7 +20,7 @@
defined( 'ABSPATH' ) || exit;

// Rocket defines.
define( 'WP_ROCKET_VERSION', '3.14.4.1' );
define( 'WP_ROCKET_VERSION', '3.14.4.2' );
define( 'WP_ROCKET_WP_VERSION', '5.8' );
define( 'WP_ROCKET_WP_VERSION_TESTED', '6.3' );
define( 'WP_ROCKET_PHP_VERSION', '7.3' );
Expand Down

0 comments on commit a38a540

Please sign in to comment.