[ColdBox-4.3.0]: Private event not working?


What does it mean by “private event”? I wrote some code to test it, but it didn’t work as I expected.

Here’s my reference: https://coldbox.ortusbooks.com/content/full/event_handlers/executing_events.html

// /handlers/Test.cfc
component {
private function save(event, rc, prc) {
rc.foo = “bar”;


I could still call it from browser, http://localhost/index.cfm?event=test.save

I thought it could only get called using runEvent(event=“test.save”, private=true);

What I intended to do is to prevent save() from external call, such as browser, but I can still call it inside my app.


Could someone help me explaining “private event”? From what I understand from https://coldbox.ortusbooks.com/content/full/event_handlers/executing_events.html, a private event cannot be called publicly, but my test code shows different results.

Thank you.

I’m not 100% sure, but I think there is or was a bug where private functions in handler components were still accessible via URL just like public event functions. I don’t think they’re supposed to be. One of our developers ran into the same thing. You could see if the latest version of coldbox still has the issue. I did a quick search (https://ortussolutions.atlassian.net/projects/COLDBOX/issues/COLDBOX-31) but didn’t see that this particular issue had been filed as a bug. It’s probably worth writing it up.

I know in early 4 versions this was the case, but it is not anymore. You can see our test suite on this.

Thanks for all the replies. I will take a look the test suite.