We are testing a migration from 5.1 to 5.2, and are having issues with
authentication.
In core/packages/security/security.cfc:
<cffunction name="authenticate" access="public" output="true"
returntype="struct" hint="Attempts to authenticate a user using each
directory, and returns true if successful">
<cfset var ud = "" />
<cfset var stResult = structnew() />
<cfset var udlist = structsort
(this.userdirectories,"numeric","asc","seq") />
<cfimport taglib="/farcry/core/tags/farcry/" prefix="farcry" />
<cfif isArray(udlist)>
<cfset udlist = arrayToList(udlist) />
</cfif>
<cfloop list="#udlist#" index="ud">
<!--- Authenticate user --->
<cfset stResult = this.userdirectories[ud].authenticate
(argumentCollection="#arguments#") />
<!--- This allows your userdirectory check multiple user
directories and pass back the successfull one. --->
<cfif not structKeyExists(stResult, "UD")>
<cfset stResult.UD = ud />
</cfif>
<cfif structkeyexists(stResult,"authenticated")>
<cfif not stResult.authenticated>
<farcry:logevent type="security"
event="loginfailed"
userid="#stResult.userid#_#stResult.UD#" notes="#stResult.message#" />
<cfbreak />
</cfif>
<!--- SUCCESS - log in user --->
<cfset
login(userid=stResult.userid,ud=stResult.UD) />
<!--- Return 'success' --->
<cfbreak />
</cfif>
</cfloop>
Line 300: cfbreak
When it loops through our UDs, it calls authenticate on CLIENTUD
first, and does not authenticate, but then line 300 causes the loop to
cfbreak, and it never gets to our second UD.
If I set udlist = "SALVAGEUD" right before the loop, it works.
What I find strange is that this code has not changed from 5.1. What
am I missing? Is it that our custom UD was returned BEFORE the
CLIENTUD in 5.1?
Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: [email protected]
To unsubscribe, email: [email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
-~----------~----~----~----~------~----~------~--~---