Details
Assignee
UnassignedUnassignedReporter
Igal SapirIgal SapirLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
New
Details
Details
Assignee
Unassigned
UnassignedReporter
Igal Sapir
Igal SapirLabels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Priority
Created 14 December 2015 at 19:20
Updated 8 January 2022 at 16:13
Allowing to add Event Handlers in Java will open a whole new set of possibilities when it comes to security, monitoring, and session management.
The proposal is to allow a Java application to subscribe to events with a callback method, which Lucee will call with a `java.util.Map` with more information. A return value will indicate to Lucee whether to continue as usual or not.
For example, the Java Interface for the callback will be something like:
interface LuceeEventHandler { boolean handleEvent(Map details); }
Then Lucee will allow to subscribe to events like RequestStart, RequestEnd, SessionStart, SessionEnd, etc.
LuceeEngine.addEventListener( "RequestStart", myEventHandler );
So now you can write an event handler that will inspect the CGI scope and kill the request if it concludes that this is a hacking probe. Obviously this will run much much faster than an equivalent CFML implementation, and can run before a Session object is initialized in the case of a Request, or construct the Session object in case of a SessionStart listener.
It opens up many new possibilities.