Skip to content

Commit

Permalink
Merge branch 'trunk' into update/unbundle-publicize-from-jetpack
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Aug 7, 2024
2 parents 930d6c6 + a99ad99 commit 97b7635
Show file tree
Hide file tree
Showing 667 changed files with 37,347 additions and 17,254 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Simple Classic: make Users -> Profile -> Email input readonly instead of disabled
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const wpcom_profile_settings_disable_email_field = () => {
}
const emailField = document.getElementById( 'email' ) as HTMLInputElement;
if ( emailField ) {
emailField.disabled = true;
emailField.readOnly = true;
}

const emailDescription = document.getElementById( 'email-description' ) as HTMLInputElement;
Expand Down
5 changes: 5 additions & 0 deletions projects/packages/sync/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.5.0] - 2024-08-06
### Changed
- Sync: Change fields for HPOS checksums [#38713]

## [3.4.1] - 2024-08-05
### Fixed
- Jetpack Sync: Take order type into account when performing HPOS Checksums [#38688]
Expand Down Expand Up @@ -1223,6 +1227,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Packages: Move sync to a classmapped package

[3.5.0]: https://github.com/Automattic/jetpack-sync/compare/v3.4.1...v3.5.0
[3.4.1]: https://github.com/Automattic/jetpack-sync/compare/v3.4.0...v3.4.1
[3.4.0]: https://github.com/Automattic/jetpack-sync/compare/v3.3.1...v3.4.0
[3.3.1]: https://github.com/Automattic/jetpack-sync/compare/v3.3.0...v3.3.1
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion projects/packages/sync/src/class-package-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
class Package_Version {

const PACKAGE_VERSION = '3.5.0-alpha';
const PACKAGE_VERSION = '3.5.0';

const PACKAGE_SLUG = 'sync';

Expand Down
4 changes: 4 additions & 0 deletions projects/packages/waf/changelog/fix-waf-request-body-problem
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: security

Parse request body when method used is not POST
13 changes: 9 additions & 4 deletions projects/packages/waf/src/class-waf-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,13 +334,18 @@ public function get_get_vars() {
* @return array{string, scalar}[]
*/
public function get_post_vars() {
// Attempt to decode JSON requests.
if ( strpos( $this->get_header( 'content-type' ), 'application/json' ) !== false ) {
if ( ! empty( $_POST ) ) {
return flatten_array( $_POST );
} elseif ( strpos( $this->get_header( 'content-type' ), 'application/json' ) !== false ) {
// Attempt to decode JSON requests.
$decoded_json = json_decode( $this->get_body(), true ) ?? array();
return flatten_array( $decoded_json, 'json', true );
} else {
// Attempt to retrieve all parameters when method used isn't POST
$body = $this->get_body();
parse_str( $body, $params );
return flatten_array( $params );
}

return flatten_array( $_POST );
}

/**
Expand Down
31 changes: 31 additions & 0 deletions projects/packages/waf/tests/php/unit/test-waf-request.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ public function testGetVarsPost() {
$this->assertContains( array( 'test_var', 'test_value' ), $value );
$this->assertContains( array( 'test_2[child]', 'value' ), $value );
$this->assertContains( array( 'test_num[0]', 'value1' ), $value );

$_POST = array();
}

/**
Expand Down Expand Up @@ -327,6 +329,35 @@ public function testGetVarsPostWithJson() {
unset( $_SERVER['CONTENT_TYPE'] );
}

/**
* Test that the Waf_Request class returns any parameters when HTTP method isn't POST.
*/
public function testGetVarsPostHttpMethodNotPost() {
$_SERVER['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
$request = $this->mock_request(
array(
'body' => (
http_build_query(
array(
'str' => 'value',
'arr' => array( 'a', 'b', 'c' ),
'obj' => (object) array( 'foo' => 'bar' ),
)
)
),
)
);
$value = $request->get_post_vars();
$this->assertIsArray( $value );
$this->assertContains( array( 'str', 'value' ), $value );
$this->assertContains( array( 'arr[0]', 'a' ), $value );
$this->assertContains( array( 'arr[1]', 'b' ), $value );
$this->assertContains( array( 'arr[2]', 'c' ), $value );
$this->assertContains( array( 'obj[foo]', 'bar' ), $value );

unset( $_SERVER['CONTENT_TYPE'] );
}

/**
* Test that the Waf_Request class transforms and returns $_FILES data correctly via Waf_Request::get_files().
*/
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Lossless image optimization of images in projects/plugins [subdirectories from a* through social]
Binary file modified projects/plugins/backup/.w.org-assets/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/backup/.w.org-assets/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/backup/.w.org-assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/backup/.w.org-assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 1 addition & 14 deletions projects/plugins/backup/.w.org-assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/backup/.w.org-assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/backup/.w.org-assets/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Lossless image optimization of images in projects/plugins [subdirectories from a* through social]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Lossless image optimization of images in projects/plugins [subdirectories from a* through social]
Binary file modified projects/plugins/beta/docs/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 1 addition & 16 deletions projects/plugins/boost/.w.org-assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/screenshot-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified projects/plugins/boost/.w.org-assets/screenshot-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 97b7635

Please sign in to comment.