I run a financial service site that has very complex pathways running
through it.  This has saved me an enormous amount of time trying to figure
out how a series of user actions could uncover some sort of hole in the
code.

This thread got me tinkering and I did some tweaking.  For starters when I
wrote it I had not yet switched to jsessionIDs.  I think this is all of it
here:

// initialize.  reqUID is a UUID that lives as long as each page request.
lock name="#request.reqUID#" type="exclusive" timeout="10" {
    if (not isDefined ("session.crumbs")) {
        session.crumbs=arrayNew(2);
        variables.SessionIDs=arrayNew(1);
        variables.SessionIDs[1]=client.cfid;
        variables.SessionIDs[2]=client.cftoken;
        variables.SessionIDs[3]=session.sessionID;
        temp=arrayAppend(session.crumbs,variables.SessionIDs);
    }
}
variables.cgiBits=structNew();
structInsert(variables.cgiBits,"https",cgi.https);
structInsert(variables.cgiBits,"http_referer",cgi.http_referer);
structInsert(variables.cgiBits,"remote_addr",cgi.remote_addr);
structInsert(variables.cgiBits,"request_method",cgi.request_method);
variables.formBits="";
if (isdefined ("form.fieldnames")) {
    variables.formBits=structNew();
    for (i=1; i lte listlen(form.fieldnames); i=i+1) {
        fieldName=listGetAt(form.fieldnames,i);
        structInsert(variables.formBits,fieldName,form[fieldname]);
    }
}
// zoneNow is now() where time value is corrected to the time zone the site
owner prefers.
// variables.currPage is full current url with query string, built
elsewhere.
variables.crumb=arrayNew(1);
variables.crumb[1]=DateFormat(CreateODBCDate(request.zoneNow),"yyyy-mm-dd")
& " " & TimeFormat(CreateODBCTime(request.zoneNow),"HH:mm:ss");
variables.crumb[2]=variables.currPage;
variables.crumb[3]=variables.formBits;
variables.crumb[4]=variables.cgiBits;

lock name="#request.reqUID#" type="exclusive" timeout="10" {
    temp=arrayAppend(session.crumbs,variables.crumb);
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359757
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to