|
@@ 169-172 (lines=4) @@
|
| 166 |
|
|
| 167 |
|
@list( $secret_1, $secret_2, $secret_eol, $user_id ) = explode( ':', $secrets ); |
| 168 |
|
|
| 169 |
|
if ( empty( $secret_1 ) || empty( $secret_2 ) || empty( $secret_eol ) ) { |
| 170 |
|
Jetpack_Options::delete_option( $action ); |
| 171 |
|
return $this->error( new Jetpack_Error( 'verify_secrets_incomplete', 'Verification secrets are incomplete', 400 ) ); |
| 172 |
|
} |
| 173 |
|
|
| 174 |
|
if ( $secret_eol < time() ) { |
| 175 |
|
Jetpack_Options::delete_option( $action ); |
|
@@ 191-194 (lines=4) @@
|
| 188 |
|
} else if ( ! ctype_digit( $state ) ) { |
| 189 |
|
return $this->error( new Jetpack_Error( 'state_malformed', sprintf( 'The required "%s" parameter is malformed.', 'state' ), 400 ) ); |
| 190 |
|
} |
| 191 |
|
if ( empty( $user_id ) || $user_id !== $state ) { |
| 192 |
|
Jetpack_Options::delete_option( $action ); |
| 193 |
|
return $this->error( new Jetpack_Error( 'invalid_state', 'State is invalid', 400 ) ); |
| 194 |
|
} |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
Jetpack_Options::delete_option( $action ); |