Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests #701

Closed
wants to merge 5 commits into from
Closed

Conversation

afilippov1985
Copy link
Contributor

No description provided.

@afilippov1985
Copy link
Contributor Author

Travis is broken again

@afilippov1985
Copy link
Contributor Author

Fix "Expiration (exp) time must be a unix time stamp"

Here ctype_digit($jwt['exp']) evals to false when $jwt['exp'] > PHP_INT_MAX

// on 32-bit
$d = 99999999900;
var_dump($d, ctype_digit($d));
//double(99999999900) bool(false) 

// BUT
$d = '99999999900';
var_dump($d, ctype_digit($d));
//string(11) "99999999900" bool(true) 

// on 64-bit
$d = 99999999900;
var_dump($d, ctype_digit($d));
//int(99999999900) bool(true) 

$d = '99999999900';
var_dump($d, ctype_digit($d));
//string(11) "99999999900" bool(true) 

@afilippov1985
Copy link
Contributor Author

May be we should also check that access_token key exists in array.

@afilippov1985
Copy link
Contributor Author

ping @bshaffer

@bshaffer
Copy link
Owner

bshaffer commented Dec 1, 2017

We should make this PR to master as the develop branch is no longer being used.

Also, the tests are passing as-is, so I'm not entirely sure what this fixes.

@afilippov1985
Copy link
Contributor Author

I'll make a few smaller PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants