Skip to content

Commit da46466

Browse files
committed
ctype_digit expects a string.
This function expects a string to be useful, so for example passing in an integer may not return the expected result.
1 parent c47a160 commit da46466

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

class.jetpack-signature.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function sign_request( $token = '', $timestamp = 0, $nonce = '', $body_hash = ''
121121
}
122122
}
123123

124-
if ( !ctype_digit( $timestamp ) || 10 < strlen( $timestamp ) ) { // If Jetpack is around in 275 years, you can blame mdawaffe for the bug.
124+
if ( !ctype_digit( "$timestamp" ) || 10 < strlen( $timestamp ) ) { // If Jetpack is around in 275 years, you can blame mdawaffe for the bug.
125125
return new Jetpack_Error( 'invalid_signature', sprintf( 'The required "%s" parameter is malformed.', 'timestamp' ) );
126126
}
127127

0 commit comments

Comments
 (0)