|
@@ 190-193 (lines=4) @@
|
| 187 |
|
|
| 188 |
|
@list( $secret_1, $secret_2, $secret_eol, $user_id ) = explode( ':', $secrets ); |
| 189 |
|
|
| 190 |
|
if ( empty( $secret_1 ) || empty( $secret_2 ) || empty( $secret_eol ) ) { |
| 191 |
|
Jetpack_Options::delete_option( $action ); |
| 192 |
|
return $this->error( new Jetpack_Error( 'verify_secrets_incomplete', 'Verification secrets are incomplete', 400 ) ); |
| 193 |
|
} |
| 194 |
|
|
| 195 |
|
if ( $secret_eol < time() ) { |
| 196 |
|
Jetpack_Options::delete_option( $action ); |
|
@@ 212-215 (lines=4) @@
|
| 209 |
|
} else if ( ! ctype_digit( $state ) ) { |
| 210 |
|
return $this->error( new Jetpack_Error( 'state_malformed', sprintf( 'The required "%s" parameter is malformed.', 'state' ), 400 ) ); |
| 211 |
|
} |
| 212 |
|
if ( empty( $user_id ) || $user_id !== $state ) { |
| 213 |
|
Jetpack_Options::delete_option( $action ); |
| 214 |
|
return $this->error( new Jetpack_Error( 'invalid_state', 'State is invalid', 400 ) ); |
| 215 |
|
} |
| 216 |
|
} |
| 217 |
|
|
| 218 |
|
Jetpack_Options::delete_option( $action ); |