Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[higgins-dev] ExpiresOn bug in Higgins Authentication Service

In project trunk/app/org.eclipse.higgins.auth.ws

In file AuthManageBean, line 171:

            properties.put("ExpiresOn", "" + new Date().getTime() / 1000 + maxLiveTime);

The above code results in string concatenation rather than integer addition, e.g. if if the date is

            1294107012

... then the result is

            12941070123600    <-- note the appended string "3600"

... but it should be

            1294110612    <--- the integer 3600 is added

A patch should be trivial by using parens like this:

            properties.put("ExpiresOn", "" + (new Date().getTime() / 1000 + maxLiveTime));

Markus
--
blog: http://danubechannel.com
phone: +43 664 3154848


Back to the top