Posted in ColdFusion | Posted on 02-26-2007 | 2,077 views
Here is a little something I tend to forget that Model-Glue supports. If you mark an event as private, it cannot be accessed via the URL. So consider:
1<event-handler name="revealA51">
2 <broadcasts>
3 <message name="getSecrets" />
4 </broadcasts>
5 <views>
6 <include name="body" template="page.a51doesntexist.cfm" />
7 </views>
8</event-handler>
2 <broadcasts>
3 <message name="getSecrets" />
4 </broadcasts>
5 <views>
6 <include name="body" template="page.a51doesntexist.cfm" />
7 </views>
8</event-handler>
To load this event via the URL, you would simple go to a URL like so:
http://www.usaf.mil/index.cf?event=revealA51
However, you can block this by simply adding access="private" to the XML:
1<event-handler name="revealA51" access="private">
2 <broadcasts>
3 <message name="getSecrets" />
4 </broadcasts>
5 <views>
6 <include name="body" template="page.a51doesntexist.cfm" />
7 </views>
8</event-handler>
2 <broadcasts>
3 <message name="getSecrets" />
4 </broadcasts>
5 <views>
6 <include name="body" template="page.a51doesntexist.cfm" />
7 </views>
8</event-handler>

