[
https://issues.apache.org/jira/browse/DIRSERVER-1950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
lucas theisen updated DIRSERVER-1950:
-------------------------------------
Attachment: DIRSERVER-1950.patch
Proposed solution patch, but seems to hang on unit test in my environment...
Will see if i can figure out why...
> Unsafe cast to int in getPwdTimeBeforeExpiry calculation of
> AuthenticationInterceptor
> -------------------------------------------------------------------------------------
>
> Key: DIRSERVER-1950
> URL: https://issues.apache.org/jira/browse/DIRSERVER-1950
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0-M15
> Reporter: lucas theisen
> Attachments: DIRSERVER-1950.patch
>
>
> int pwdAge = ( int ) ( currentTime - changedTime ) / 1000;
> Will cast to int before the division which causes overflow of int if the
> difference is too large. Even with division, it could still be too large so
> it is unsafe to use an int value for pwdAge. As it is only used for
> comparison, we can leave it as a long.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)