desmondcheongzx opened a new pull request, #641:
URL: https://github.com/apache/arrow-rs-object-store/pull/641
# Which issue does this PR close?
Closes #640.
# Rationale for this change
`FabricTokenOAuthProvider::fetch_token` uses unsigned integer subtraction
when checking token expiry. When a cached token has expired (`expiry <
current_timestamp`), this causes an overflow when adding duration to instant.
This prevents the provider from falling through to the token refresh path as
intended.
The issue contains a more detailed breakdown.
# What changes are included in this PR?
Replace `-` with `saturating_sub()` for unsigned integer subtractions in the
token expiry checks.
Add a repro test that now passes.
# Are there any user-facing changes?
Bug fix only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]