Sorry, should have read this thread before to save time from both of
you guys: https://issues.apache.org/jira/browse/SHIRO-182. Best thing
is to use 1.1.0-SNAPSHOT for now, we should be able to get the release
out after fairly quickly after becoming TLP.

Kalle


On Thu, Sep 16, 2010 at 9:25 AM, Mike K <[email protected]> wrote:
>
> Les, this is starting too look like a problem with the serialization,
> although it may have been already fixed in your world.
> This seems to be the issue in SimpleSession:
> the bitMask is being set if !expired, but written if expired.
>
> private short getAlteredFieldsBitMask() {
>        int bitMask = 0;
>        bitMask = id != null ? bitMask | ID_BIT_MASK : bitMask;
>        bitMask = startTimestamp != null ? bitMask |
> START_TIMESTAMP_BIT_MASK : bitMask;
>        bitMask = stopTimestamp != null ? bitMask | STOP_TIMESTAMP_BIT_MASK
> : bitMask;
>        bitMask = lastAccessTime != null ? bitMask |
> LAST_ACCESS_TIME_BIT_MASK : bitMask;
>        bitMask = timeout != 0l ? bitMask | TIMEOUT_BIT_MASK : bitMask;
>        bitMask = !expired ? bitMask | EXPIRED_BIT_MASK : bitMask;
>        bitMask = host != null ? bitMask | HOST_BIT_MASK : bitMask;
>        bitMask = !CollectionUtils.isEmpty(attributes) ? bitMask |
> ATTRIBUTES_BIT_MASK : bitMask;
>        return (short) bitMask;
>    }
>  private void writeObject(ObjectOutputStream out) throws IOException {
>        out.defaultWriteObject();
>        short alteredFieldsBitMask = getAlteredFieldsBitMask();
>        out.writeShort(alteredFieldsBitMask);
>        if (id != null) {
>            out.writeObject(id);
>        }
>        if (startTimestamp != null) {
>            out.writeObject(startTimestamp);
>        }
>        if (stopTimestamp != null) {
>            out.writeObject(stopTimestamp);
>        }
>        if (lastAccessTime != null) {
>            out.writeObject(lastAccessTime);
>        }
>        if (timeout != 0l) {
>            out.writeLong(timeout);
>        }
>        if (expired) {
>            out.writeBoolean(expired);
>        }
>        if (host != null) {
>            out.writeUTF(host);
>        }
>        if (!CollectionUtils.isEmpty(attributes)) {
>            out.writeObject(attributes);
>        }
>    }
>
>
>
>
> --
> View this message in context: 
> http://shiro-user.582556.n2.nabble.com/Permission-checking-on-client-side-tp5450587p5539227.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Reply via email to