Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Possible overflow during access token processing #105

Open
redwerk opened this issue Jun 18, 2013 · 0 comments
Open

Possible overflow during access token processing #105

redwerk opened this issue Jun 18, 2013 · 0 comments

Comments

@redwerk
Copy link

redwerk commented Jun 18, 2013

We have the problem that Facebook long-lived access token's lifetime is two weeks instead of 60 days. The expiration date doesn't correspond to original received from Facebook after Spring Social saves token to DB repository table.
The possible problem is overflow in the Spring Social code

public AccessGrant(String accessToken, String scope, String refreshToken, Integer expiresIn) {
this.accessToken = accessToken;
this.scope = scope;
this.refreshToken = refreshToken;
this.expireTime = expiresIn != null ? System.currentTimeMillis() + expiresIn * 1000 : null;
}

expiresIn * 1000 will overflow the Integer type.

Please check

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

No branches or pull requests

1 participant