3.5 + Security Interceptor

Has anything changed between 3.1 and 3.5 in terms of configuring the
Security interceptor? I had everything working fine in 3.1 but I'm
trying to test out 3.5 and getting an error (running on latest BER
Railo). I put the stack trace at the bottom of this message.

My config looks like so:

interceptors = [
  //SES
  { class="interceptors.SES" },
  // security
  { class="coldbox.system.interceptors.Security",
properties={ rulesSource="xml", rulesFile="config/
securityrules.xml.cfm", debugMode="false",
validatorModel="Security" } }
];

And I have a model/Security.cfc which does in fact have a
userValidator() method. Is there anything in config/
securityrules.xml.cfm that needs to be updated?

Looking forward to trying out the great new stuff in 3.5! Great work
as always folks.

component [coldbox.system.interceptors.Security] has no function with
name [userValidator]
  at
railo.runtime.type.util.ComponentUtil.notFunction(ComponentUtil.java:
563):563
  at railo.runtime.ComponentImpl.onMissingMethod(ComponentImpl.java:
541):541
  at railo.runtime.ComponentImpl._call(ComponentImpl.java:504):504
  at railo.runtime.ComponentImpl.call(ComponentImpl.java:1815):1815
  at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:
733):733
  at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:
1441):1441
  at system.interceptors.security_cfc$cf._1(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc:266):266
  at system.interceptors.security_cfc$cf.udfCall(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc):-1
  at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215
  at railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434
  at railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384
  at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:
738):738
  at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:
1441):1441
  at system.interceptors.security_cfc$cf._1(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc:193):193
  at system.interceptors.security_cfc$cf.udfCall(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc):-1
  at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:215):215
  at railo.runtime.type.UDFImpl._call(UDFImpl.java:434):434
  at railo.runtime.type.UDFImpl.call(UDFImpl.java:384):384
  at
railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:
738):738
  at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:
1441):1441
  at system.interceptors.security_cfc$cf._1(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc:149):149
  at system.interceptors.security_cfc$cf.udfCall(/var/www/sites/
coldbox.platform/3.5.0/system/interceptors/Security.cfc):-1
        .....

Shouldn’t

{ class=“interceptors.SES” },

be

{ class=“coldbox.system.interceptors.SES”, properties={} },

Otherwise everything else actually looks fine.

I have a custom interceptor at interceptors.SES that extends coldbox.system.interceptors.SES. For kicks I removed that (used coldbox.system.interceptors.SES) and it made no difference.

Ok, no problem apart from that everything else did look fine.

I guess you have reinited your application just to be double sure as well. The only other thing I can think of is that it is actually spelled right, the method in the model.

I think I figured it out. getModel(‘Security’) was returning coldbox.system.interceptors.Security instead of my model.Security, I assume there must be an internal Wirebox binding which does this?

I renamed my Security model to SecurityService and now it works.

Thanks!

Might have to check with Luis on that, but I don’t think it should be hard coded to SecurityService, unles the validatorIOC setting takes a part here.

It was a bug and just fixed

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

You rock Luis.