Skip to content

Commit 7cdd841

Browse files
authored
Global styles experiment: return early (#45929)
1 parent 82956d8 commit 7cdd841

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: security
3+
4+
Implemented a guard against non user objects when assigning an experiment variation

projects/packages/jetpack-mu-wpcom/src/features/wpcom-global-styles/index.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,9 @@ function is_global_styles_on_personal_plan() {
818818
return false;
819819
}
820820
$wpcom_blog_owner = get_userdata( $wpcom_blog_owner_id );
821+
if ( ! $wpcom_blog_owner ) {
822+
return false;
823+
}
821824
// WP.com: Direct ExPlat assignment.
822825
$assignment = \ExPlat\assign_given_user( $experiment_key, $wpcom_blog_owner );
823826
$enabled = ( null !== $assignment );

0 commit comments

Comments
 (0)