class.jetpack.php 1 location
|
@@ 5030-5036 (lines=7) @@
|
| 5027 |
|
add_action( 'pre_update_jetpack_option_register', array( 'Jetpack_Options', 'delete_option' ) ); |
| 5028 |
|
$secrets = Jetpack::generate_secrets( 'register' ); |
| 5029 |
|
|
| 5030 |
|
if ( |
| 5031 |
|
empty( $secrets['secret_1'] ) || |
| 5032 |
|
empty( $secrets['secret_2'] ) || |
| 5033 |
|
empty( $secrets['exp'] ) |
| 5034 |
|
) { |
| 5035 |
|
return new Jetpack_Error( 'missing_secrets' ); |
| 5036 |
|
} |
| 5037 |
|
|
| 5038 |
|
// better to try (and fail) to set a higher timeout than this system |
| 5039 |
|
// supports than to have register fail for more users than it should |
class.jetpack-network.php 1 location
|
@@ 432-438 (lines=7) @@
|
| 429 |
|
// Save the secrets in the subsite so when the wpcom server does a pingback it |
| 430 |
|
// will be able to validate the connection |
| 431 |
|
$secrets = $jp->generate_secrets( 'register' ); |
| 432 |
|
if ( |
| 433 |
|
empty( $secrets['secret_1'] ) || |
| 434 |
|
empty( $secrets['secret_2'] ) || |
| 435 |
|
empty( $secrets['exp'] ) |
| 436 |
|
) { |
| 437 |
|
return new Jetpack_Error( 'missing_secrets' ); |
| 438 |
|
} |
| 439 |
|
|
| 440 |
|
// Gra info for gmt offset |
| 441 |
|
$gmt_offset = get_option( 'gmt_offset' ); |
packages/connection/src/Manager.php 1 location
|
@@ 178-184 (lines=7) @@
|
| 175 |
|
add_action( 'pre_update_jetpack_option_register', array( '\Jetpack_Options', 'delete_option' ) ); |
| 176 |
|
$secrets = $this->generate_secrets( 'register', get_current_user_id(), 600 ); |
| 177 |
|
|
| 178 |
|
if ( |
| 179 |
|
empty( $secrets['secret_1'] ) || |
| 180 |
|
empty( $secrets['secret_2'] ) || |
| 181 |
|
empty( $secrets['exp'] ) |
| 182 |
|
) { |
| 183 |
|
return new \WP_Error( 'missing_secrets' ); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
// Better to try (and fail) to set a higher timeout than this system |
| 187 |
|
// supports than to have register fail for more users than it should. |