Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *******************************************
- * Problem
- *******************************************
- Wheels.InvalidAuthenticityToken
- This POSTed request was attempted without a valid authenticity token.
- Tag context
- Error thrown on line 34 in wheels\controller\csrf.cfm
- - called from line 11 in wheels\controller\processing.cfm
- - called from line 184 in wheels\dispatch\functions.cfm
- - called from line 5 in wheels\index.cfm
- - called from line 2 in index.cfm
- - called from line 5 in wheels\events\onrequest.cfm
- *******************************************
- * login.cfm generated code from view source code
- *******************************************
- <html>
- <head>
- </head>
- <body>
- <form action="/index.cfm/alfred/signin" method="post"><input id="authenticityToken" name="authenticityToken" type="hidden" value="F45F79BBE31DAEA0FBEB75268DD62512BE2F3306"><input id="_method" name="_method" type="hidden" value="post"> <label for="logintoken">Login token<input id="logintoken" name="logintoken" type="text" value=""></label> <input type="submit" value="Login"> </form>
- </body>
- </html>
- *******************************************
- * routes
- *******************************************
- <cfscript>
- mapper()
- .root(to="referees##login", method="get,post")
- .post(name="alfredsignin", pattern="alfred/signin", to="alfred##signin", method="post")
- .end();
- </cfscript>
- *******************************************
- * controllers
- *******************************************
- Alfred.cfc: (note: the cfscript stuff is because I'm refactoring from markup to cfscript)
- <cfcomponent extends="Controller" output="false">
- <cffunction name="config">
- <cfscript>
- super.config();
- freememory(); //initialize memory numbers
- </cfscript>
- </cffunction>
- <cffunction name="login">
- <cfscript>
- param name="params.logintoken" default="";
- </cfscript>
- </cffunction>
- <cffunction name="signin">
- <cfscript>
- param name="params.logintoken" default="";
- </cfscript>
- </cffunction>
- </cfcomponent>
- *******************************************
- * Views
- *******************************************
- layout.cfm
- <!--- Place HTML here that should be used as the default layout of your application. --->
- <html>
- <head>
- <!--- <cfoutput>#csrfMetaTags()#</cfoutput> --->
- </head>
- <body>
- <cfoutput>
- #flashMessages()#
- #includeContent()#
- </cfoutput>
- </body>
- </html>
- -----------------------------------------------------------------
- login.cfm
- <cfoutput>
- <p>
- #flash("error")#
- </p>
- #startFormTag(route="alfredsignin")#
- #textFieldTag(label="Login token", name="logintoken", value=params.logintoken)#
- #submitTag(value="Login")#
- #endFormTag()#
- #createLoginToken(54,1654961)#
- </cfoutput>
- -----------------------------------------------------------------
- signin.cfm
- Arrived
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement