Skip to content

Commit c8427ca

Browse files
sergeymitrmatticbot
authored andcommitted
Connection: add 'offline mode' flag to IDC secret check endpoint (#42779)
* Indicate the offline mode status in `/jetpack/v4/identity-crisis/idc-url-validation` endpoint. * Only activate the functionality if offline mode is set via DB option. Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/14168815909 Upstream-Ref: Automattic/jetpack@6351213
1 parent 37a3b3f commit c8427ca

File tree

6 files changed

+84
-78
lines changed

6 files changed

+84
-78
lines changed

jetpack_vendor/automattic/jetpack-connection/src/class-package-version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
class Package_Version {
1414

15-
const PACKAGE_VERSION = '6.9.1-alpha';
15+
const PACKAGE_VERSION = '6.10.0-alpha';
1616

1717
const PACKAGE_SLUG = 'connection';
1818

jetpack_vendor/automattic/jetpack-connection/src/class-rest-connector.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ public static function connection_status( $rest_response = true ) {
508508
/** This filter is documented in packages/status/src/class-status.php */
509509
'filter' => ( apply_filters( 'jetpack_development_mode', false ) || apply_filters( 'jetpack_offline_mode', false ) ), // jetpack_development_mode is deprecated.
510510
'wpLocalConstant' => defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV,
511-
'option' => get_option( 'jetpack_offline_mode' ),
511+
'option' => (bool) get_option( 'jetpack_offline_mode' ),
512512
),
513513
'isPublic' => '1' == get_option( 'blog_public' ), // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
514514
);

jetpack_vendor/automattic/jetpack-connection/src/identity-crisis/class-identity-crisis.php

+6
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,12 @@ public static function locate_wp_config() {
667667
* phpcs:ignore Squiz.Commenting.FunctionCommentThrowTag -- The exception is being caught, false positive.
668668
*/
669669
public static function add_secret_to_url_validation_response( array $response ) {
670+
// Only checking the database option to limit the effect.
671+
if ( get_option( 'jetpack_offline_mode' ) ) {
672+
$response['offline_mode'] = '1';
673+
return $response;
674+
}
675+
670676
try {
671677
$secret = new URL_Secret();
672678

jetpack_vendor/i18n-map.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
),
3535
'jetpack-connection' => array(
3636
'path' => 'jetpack_vendor/automattic/jetpack-connection',
37-
'ver' => '6.9.1-alpha1743090361',
37+
'ver' => '6.10.0-alpha1743414617',
3838
),
3939
'jetpack-google-analytics' => array(
4040
'path' => 'jetpack_vendor/automattic/jetpack-google-analytics',

vendor/composer/installed.json

+43-43
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"dist": {
8282
"type": "path",
8383
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
84-
"reference": "6608e4e6a1c4fc8f62c1f65a0abfc5b527c72a2d"
84+
"reference": "3a94033d6d7d64f832453bd2fd62ac55593609ef"
8585
},
8686
"require": {
8787
"php": ">=7.2"
@@ -138,7 +138,7 @@
138138
"dist": {
139139
"type": "path",
140140
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
141-
"reference": "3959a5518841e69a01a63358d45467df57a80c33"
141+
"reference": "2f657c1271d9381b421242529a3150fa1bfc9fcf"
142142
},
143143
"require": {
144144
"php": ">=7.2"
@@ -201,7 +201,7 @@
201201
"dist": {
202202
"type": "path",
203203
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
204-
"reference": "dd9ff1c358c8b7990ceeb166ff74972ef3ee904f"
204+
"reference": "db2da47c1dbeabef948b61a07ee8cf15295d75de"
205205
},
206206
"require": {
207207
"automattic/jetpack-constants": "^3.0.6-alpha",
@@ -274,11 +274,11 @@
274274
"dist": {
275275
"type": "path",
276276
"url": "/tmp/jetpack-build/Automattic/jetpack-blaze",
277-
"reference": "cbc40386948f049ec3aae3d3ad63ad1a769025f4"
277+
"reference": "5659e3207b3c506829856d27ebba380ec37dbfc4"
278278
},
279279
"require": {
280280
"automattic/jetpack-assets": "^4.0.15-alpha",
281-
"automattic/jetpack-connection": "^6.9.1-alpha",
281+
"automattic/jetpack-connection": "^6.10.0-alpha",
282282
"automattic/jetpack-constants": "^3.0.6-alpha",
283283
"automattic/jetpack-plans": "^0.7.0-alpha",
284284
"automattic/jetpack-redirect": "^3.0.6-alpha",
@@ -353,7 +353,7 @@
353353
"dist": {
354354
"type": "path",
355355
"url": "/tmp/jetpack-build/Automattic/jetpack-blocks",
356-
"reference": "4a7e2beb0a8e873164367ff43f702e4b5e61a5d8"
356+
"reference": "08d67be21e39669d4f99f64b1c6c86f468a587ab"
357357
},
358358
"require": {
359359
"automattic/jetpack-constants": "^3.0.6-alpha",
@@ -413,7 +413,7 @@
413413
"dist": {
414414
"type": "path",
415415
"url": "/tmp/jetpack-build/Automattic/jetpack-calypsoify",
416-
"reference": "e3281ef5c5d558943c496d25993811254054f6eb"
416+
"reference": "f9228601c27376af6bc261faa30c01a9675e229d"
417417
},
418418
"require": {
419419
"automattic/jetpack-assets": "^4.0.15-alpha",
@@ -482,7 +482,7 @@
482482
"dist": {
483483
"type": "path",
484484
"url": "/tmp/jetpack-build/Automattic/jetpack-classic-theme-helper",
485-
"reference": "518a371e5f8cfc5c2266209d8c9a5d0c90e7609a"
485+
"reference": "25b0dfac237f2651ea863adac9c8960424244565"
486486
},
487487
"require": {
488488
"automattic/jetpack-assets": "^4.0.15-alpha",
@@ -550,7 +550,7 @@
550550
"dist": {
551551
"type": "path",
552552
"url": "/tmp/jetpack-build/Automattic/jetpack-compat",
553-
"reference": "0c597ee7ef3ec8e185f1db2a36492b0bae28cefc"
553+
"reference": "e8c9ed2c66e0b144d2216d80f28c1f5590e33304"
554554
},
555555
"require": {
556556
"php": ">=7.2"
@@ -590,7 +590,7 @@
590590
"dist": {
591591
"type": "path",
592592
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
593-
"reference": "4ad5911f44ad874335a683c83ccdfbd404add9ef"
593+
"reference": "861a6d2f3a26731990dfd5f0c8689bedc4cf3529"
594594
},
595595
"require": {
596596
"composer-plugin-api": "^2.2",
@@ -654,7 +654,7 @@
654654
"dist": {
655655
"type": "path",
656656
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
657-
"reference": "a059f60ca521e674f84e33584fa9f748db898b4f"
657+
"reference": "dfcb0f78295663c4d81916d1fe835da4a0d3c991"
658658
},
659659
"require": {
660660
"php": ">=7.2"
@@ -726,12 +726,12 @@
726726
},
727727
{
728728
"name": "automattic/jetpack-connection",
729-
"version": "6.9.1-alpha.1743090361",
730-
"version_normalized": "6.9.1.0-alpha1743090361",
729+
"version": "6.10.0-alpha.1743414617",
730+
"version_normalized": "6.10.0.0-alpha1743414617",
731731
"dist": {
732732
"type": "path",
733733
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
734-
"reference": "c751f062ee7bf2c684fa8a8299e62fcb349fe3b9"
734+
"reference": "308a02c235ef0c2310b2f53ccbfa09983def20c2"
735735
},
736736
"require": {
737737
"automattic/jetpack-a8c-mc-stats": "^3.0.4",
@@ -765,7 +765,7 @@
765765
"link-template": "https://github.com/Automattic/jetpack-connection/compare/v${old}...v${new}"
766766
},
767767
"branch-alias": {
768-
"dev-trunk": "6.9.x-dev"
768+
"dev-trunk": "6.10.x-dev"
769769
},
770770
"dependencies": {
771771
"test-only": [
@@ -819,7 +819,7 @@
819819
"dist": {
820820
"type": "path",
821821
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
822-
"reference": "e6451d05a0ad93fed785455a6596fda74aae539a"
822+
"reference": "4d734ab758b49046142ae31063b705d0ac33efe5"
823823
},
824824
"require": {
825825
"php": ">=7.2"
@@ -877,7 +877,7 @@
877877
"dist": {
878878
"type": "path",
879879
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
880-
"reference": "89933042b4caa81a948d922bf96f20b6477dddc6"
880+
"reference": "5ac175422dff0cd5f215df82c380e4b9ffc4df20"
881881
},
882882
"require": {
883883
"php": ">=7.2"
@@ -934,7 +934,7 @@
934934
"dist": {
935935
"type": "path",
936936
"url": "/tmp/jetpack-build/Automattic/jetpack-google-analytics",
937-
"reference": "0bba6508736847b60399a166b88dbaa5146de5e3"
937+
"reference": "9693e59d2c157f8dbaf826951f33803d8fa0d211"
938938
},
939939
"require": {
940940
"automattic/jetpack-status": "^5.1.1-alpha",
@@ -1003,7 +1003,7 @@
10031003
"dist": {
10041004
"type": "path",
10051005
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
1006-
"reference": "f2dcdb01d35dc97566d77464f48cdb9611ef98f5"
1006+
"reference": "68c27d30e90119111141f2d85fa78fa8e746f76b"
10071007
},
10081008
"require": {
10091009
"php": ">=7.2"
@@ -1065,12 +1065,12 @@
10651065
"dist": {
10661066
"type": "path",
10671067
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
1068-
"reference": "d95c6697f985ac8c2e72ed5773b685b8b008f0ae"
1068+
"reference": "6ce0097ea2e677dd12669599047db48b080d9341"
10691069
},
10701070
"require": {
10711071
"automattic/jetpack-a8c-mc-stats": "^3.0.4",
10721072
"automattic/jetpack-assets": "^4.0.15-alpha",
1073-
"automattic/jetpack-connection": "^6.9.1-alpha",
1073+
"automattic/jetpack-connection": "^6.10.0-alpha",
10741074
"automattic/jetpack-device-detection": "^3.0.5",
10751075
"automattic/jetpack-logo": "^3.0.4",
10761076
"automattic/jetpack-redirect": "^3.0.6-alpha",
@@ -1144,7 +1144,7 @@
11441144
"dist": {
11451145
"type": "path",
11461146
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
1147-
"reference": "4acdd536baebdcc48818ba696eeb6a33221e14a9"
1147+
"reference": "5fa5cb84b8a7f469ec28ea00493b21accdcc0783"
11481148
},
11491149
"require": {
11501150
"php": ">=7.2"
@@ -1201,13 +1201,13 @@
12011201
"dist": {
12021202
"type": "path",
12031203
"url": "/tmp/jetpack-build/Automattic/jetpack-masterbar",
1204-
"reference": "554dd1bf34c985c8d380b900a471300fab4d9292"
1204+
"reference": "98d9e99e1b34fff90ed1f92dbec0b7fa33dd1b3e"
12051205
},
12061206
"require": {
12071207
"automattic/jetpack-assets": "^4.0.15-alpha",
12081208
"automattic/jetpack-blaze": "^0.25.18-alpha",
12091209
"automattic/jetpack-compat": "^4.0.1",
1210-
"automattic/jetpack-connection": "^6.9.1-alpha",
1210+
"automattic/jetpack-connection": "^6.10.0-alpha",
12111211
"automattic/jetpack-device-detection": "^3.0.5",
12121212
"automattic/jetpack-jitm": "^4.2.9-alpha",
12131213
"automattic/jetpack-logo": "^3.0.4",
@@ -1287,15 +1287,15 @@
12871287
"dist": {
12881288
"type": "path",
12891289
"url": "/tmp/jetpack-build/Automattic/jetpack-mu-wpcom",
1290-
"reference": "9b8623e4f9a2f320f8873203c6f8a3f3dfeb7710"
1290+
"reference": "34f10860bef23bcd02064905df35bc30e80f40c7"
12911291
},
12921292
"require": {
12931293
"automattic/jetpack-assets": "^4.0.15-alpha",
12941294
"automattic/jetpack-blocks": "^3.0.9-alpha",
12951295
"automattic/jetpack-calypsoify": "^0.2.2-alpha",
12961296
"automattic/jetpack-classic-theme-helper": "^0.11.5",
12971297
"automattic/jetpack-compat": "^4.0.1",
1298-
"automattic/jetpack-connection": "^6.9.1-alpha",
1298+
"automattic/jetpack-connection": "^6.10.0-alpha",
12991299
"automattic/jetpack-google-analytics": "^0.3.1-alpha",
13001300
"automattic/jetpack-masterbar": "^0.14.3-alpha",
13011301
"automattic/jetpack-redirect": "^3.0.6-alpha",
@@ -1374,7 +1374,7 @@
13741374
"dist": {
13751375
"type": "path",
13761376
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
1377-
"reference": "1c50c7c0a45fe760ba4f9f0923c25205230f21c4"
1377+
"reference": "29ab26bf5689a82ab396154ea1627df39dc3d8a7"
13781378
},
13791379
"require": {
13801380
"php": ">=7.2"
@@ -1433,10 +1433,10 @@
14331433
"dist": {
14341434
"type": "path",
14351435
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
1436-
"reference": "3486fcc4e2fedfcc7e591efaf7bd5c08b5f78e01"
1436+
"reference": "4760cafc1686b6974b4c0dbb7a953406a5b9a993"
14371437
},
14381438
"require": {
1439-
"automattic/jetpack-connection": "^6.9.1-alpha",
1439+
"automattic/jetpack-connection": "^6.10.0-alpha",
14401440
"php": ">=7.2"
14411441
},
14421442
"require-dev": {
@@ -1499,7 +1499,7 @@
14991499
"dist": {
15001500
"type": "path",
15011501
"url": "/tmp/jetpack-build/Automattic/jetpack-post-list",
1502-
"reference": "26a320fd6f63471d3cb6c304c3071020ff5854b1"
1502+
"reference": "ed914214fc9540cc872d1d368b25f4fb0f5c5e1a"
15031503
},
15041504
"require": {
15051505
"automattic/jetpack-assets": "^4.0.15-alpha",
@@ -1568,7 +1568,7 @@
15681568
"dist": {
15691569
"type": "path",
15701570
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
1571-
"reference": "2e4cf8ade30858f729f1b9878ce2da9ec96a07e2"
1571+
"reference": "253caf5c45012d3d36bfa6bf057969c2d8175c7f"
15721572
},
15731573
"require": {
15741574
"automattic/jetpack-status": "^5.1.1-alpha",
@@ -1627,7 +1627,7 @@
16271627
"dist": {
16281628
"type": "path",
16291629
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
1630-
"reference": "54c233632fb6447f69cf415504b156524d22554b"
1630+
"reference": "8fc7019386a4389239c3350af41df8954a5ba927"
16311631
},
16321632
"require": {
16331633
"php": ">=7.2"
@@ -1685,10 +1685,10 @@
16851685
"dist": {
16861686
"type": "path",
16871687
"url": "/tmp/jetpack-build/Automattic/jetpack-stats",
1688-
"reference": "a55db7a0d5ba542073b26b006852ea430f4712b3"
1688+
"reference": "8fc918c2dae8923aa8b0bcff0e5cc8bc7e74d91a"
16891689
},
16901690
"require": {
1691-
"automattic/jetpack-connection": "^6.9.1-alpha",
1691+
"automattic/jetpack-connection": "^6.10.0-alpha",
16921692
"automattic/jetpack-constants": "^3.0.6-alpha",
16931693
"automattic/jetpack-status": "^5.1.1-alpha",
16941694
"php": ">=7.2"
@@ -1755,10 +1755,10 @@
17551755
"dist": {
17561756
"type": "path",
17571757
"url": "/tmp/jetpack-build/Automattic/jetpack-stats-admin",
1758-
"reference": "656b35483c5a832b78bf6785ab4efe858ca4e5d5"
1758+
"reference": "42216b9e0d6bfdc18d01d6c485f37304b3bb38f8"
17591759
},
17601760
"require": {
1761-
"automattic/jetpack-connection": "^6.9.1-alpha",
1761+
"automattic/jetpack-connection": "^6.10.0-alpha",
17621762
"automattic/jetpack-constants": "^3.0.6-alpha",
17631763
"automattic/jetpack-jitm": "^4.2.9-alpha",
17641764
"automattic/jetpack-plans": "^0.7.0-alpha",
@@ -1826,7 +1826,7 @@
18261826
"dist": {
18271827
"type": "path",
18281828
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
1829-
"reference": "3e3f0325903419a1b98b36a265fd08638d4db6ad"
1829+
"reference": "e4022b340512beb76c22ae6854638ceee1ca50eb"
18301830
},
18311831
"require": {
18321832
"automattic/jetpack-constants": "^3.0.6-alpha",
@@ -1894,10 +1894,10 @@
18941894
"dist": {
18951895
"type": "path",
18961896
"url": "/tmp/jetpack-build/Automattic/jetpack-subscribers-dashboard",
1897-
"reference": "8951f2b2abfa8023490efb399e18b1c54e4c950c"
1897+
"reference": "d8f16653a76c89b388eb123c24c2c3d9076609bf"
18981898
},
18991899
"require": {
1900-
"automattic/jetpack-connection": "^6.9.1-alpha",
1900+
"automattic/jetpack-connection": "^6.10.0-alpha",
19011901
"automattic/jetpack-constants": "^3.0.6-alpha",
19021902
"automattic/jetpack-jitm": "^4.2.9-alpha",
19031903
"automattic/jetpack-plans": "^0.7.0-alpha",
@@ -1976,10 +1976,10 @@
19761976
"dist": {
19771977
"type": "path",
19781978
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
1979-
"reference": "c3bb52bf6288d4bf729534433f07d05b6b4c54f9"
1979+
"reference": "9f8b2791c690ff6863dab3e14412f37520545ca7"
19801980
},
19811981
"require": {
1982-
"automattic/jetpack-connection": "^6.9.1-alpha",
1982+
"automattic/jetpack-connection": "^6.10.0-alpha",
19831983
"automattic/jetpack-constants": "^3.0.6-alpha",
19841984
"automattic/jetpack-ip": "^0.4.7-alpha",
19851985
"automattic/jetpack-password-checker": "^0.4.7",
@@ -2052,10 +2052,10 @@
20522052
"dist": {
20532053
"type": "path",
20542054
"url": "/tmp/jetpack-build/Automattic/scheduled-updates",
2055-
"reference": "867a5d28cf17e5b199dc573ac29ea11842e1b488"
2055+
"reference": "ab9297e8645dbc48002bdb781fcabe66150f8640"
20562056
},
20572057
"require": {
2058-
"automattic/jetpack-connection": "^6.9.1-alpha",
2058+
"automattic/jetpack-connection": "^6.10.0-alpha",
20592059
"automattic/jetpack-constants": "^3.0.6-alpha",
20602060
"automattic/jetpack-plans": "^0.7.0-alpha",
20612061
"automattic/jetpack-status": "^5.1.1-alpha",

0 commit comments

Comments
 (0)