Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: Grails-Crowd 0.4
-
Fix Version/s: Grails-Crowd 0.5
-
Component/s: None
-
Labels:None
-
Patch Submitted:Yes
Description
If authorisation has been denied for a user, response.sendError(403) generates an IllegalStateException due to the response already being sent (I would assume this is because of the redirect to the login page).
Although the 403 seems to be a reasonable thing to expect, it is never interpreted or seen due to the exception and therefore doesn't really serve much of a purpose. I've included a patch that simply removes the sendError, but really I'm not sure if this issue might be resolved better somewhere else.
This patch results in a security hole in the plugin: Though the response.sendError results in incorrect behaviour when a user has not yet authenticated, this response is necessary for when the user is authenticated and must then be authorised. If the sendError is missing, an unauthorised user is able to access areas that they should not.
Moral of the story: Do not apply this patch. The issue must be resolved elsewhere.