lukefitzwolfgang / icatproject

Automatically exported from code.google.com/p/icatproject
0 stars 0 forks source link

INTERNAL exception when logout is called with invalid session id #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According to the client documentation, ICAT throws an exception of type SESSION 
when called with an invalid sessionId.  I verified this for getUserName().  But 
logout() throws an INTERNAL exception instead.

What steps will reproduce the problem?

Case I, wrong session id:
1. set sessionId to a wrong session id.
2. call getUserName(sessionId), ICAT raises an exception "Unable to find user 
by sessionid: ..." with type SESSION.
3. call logout(sessionId), ICAT raises an exception "Unexpected DB response 
class org.icatproject.core.IcatException Unable to find user by sessionid: ..." 
with type INTERNAL.

Case II, expired session id:
1. set sessionId to an expired session id.
2. call getUserName(sessionId), ICAT raises an exception "Session id:... has 
expired" with type SESSION.
3. call logout(sessionId), ICAT raises an exception "IllegalStateExceptionnull" 
with type INTERNAL. The expired session is removed from the data base 
nevertheless.

See attached session script for details.

What is the expected output? What do you see instead?

Expect an exception of type SESSION in all cases.  In the case of an expired 
session id, logout might also silently ignore the error instead.

Original issue reported on code.google.com by rolf.kr...@helmholtz-berlin.de on 28 Oct 2013 at 9:44

Attachments:

GoogleCodeExporter commented 9 years ago
I have reproduced the incorrect behaviour

Original comment by dr.s.m.f...@gmail.com on 28 Oct 2013 at 10:38

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2777.

Original comment by dr.s.m.f...@gmail.com on 28 Oct 2013 at 11:01

GoogleCodeExporter commented 9 years ago

Original comment by dr.s.m.f...@gmail.com on 28 Oct 2013 at 11:05

GoogleCodeExporter commented 9 years ago
I recently noticed that the same error also occur with refresh.  E.g. calling 
refresh(sessionId) with sessionId being a wrong session id, also raises an 
exception "Unexpected DB response class org.icatproject.core.IcatException 
Unable to find user by sessionid: ..." with type INTERNAL.

Original comment by rolf.kr...@helmholtz-berlin.de on 12 Nov 2013 at 11:03

GoogleCodeExporter commented 9 years ago
This is now fixed in revision r2833

Original comment by dr.s.m.f...@gmail.com on 12 Dec 2013 at 2:25

GoogleCodeExporter commented 9 years ago
Fixed in release 4.3.1

Original comment by dr.s.m.f...@gmail.com on 13 Dec 2013 at 11:00