1 Reply Latest reply: Sep 14, 2009 10:50 AM by ilssac RSS

    Mystical Session Value Updating

    ilssac Community Member

      I am de-constructing a very old and convoluted ColdFusion application.

      *One*
      -----
      I have a page with this url:
      http://calpip-devsite/county.cfm

      *Two*
      -----
      On this page, through a mind boggling series of logic branches and include files there is this bit of code for a form.

      <form action="" name="NavForm" method="post" style="" target="_top">
           <select class="bluelink" name="ds" style="position: relative;left: 12px; font-size: 70%;" onchange="document.forms.NavForm.submit()">
                <option value="PUR" onclick="document.NavForm.submit()" title="Pesticide Use Report">PUR</option>
                <option value="GWPA" onclick="document.NavForm.submit()" title="Ground Water Protection Area">GWPA</option>
                <option value="PRESCRIBE" onclick="document.NavForm.submit()" title="Endangered Species Bulletin"selected="selected">PRESCRIBE</option>
           </select>
      </form>



      *Three*
      -----
      When I select an option in that form, I can see that the browser is re-requesting the county.cfm template.

      http://calpip-devsite/county.cfm
      POST /county.cfm HTTP/1.1
      Host: calpip-devsite
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 300
      Connection: keep-alive
      Referer: http://calpip-devsite/county.cfm
      Cookie: CFID=405; CFTOKEN=21755218;
      FCLIENT_CALPIP=uid%3D40521755218%23;
      CFGLOBALS=urltoken%3DCFID%23%3D405%26CFTOKEN%23%3D21755218%23lastvisit%3D%7Bts%20%272009%2D09%2D14%2010%3A10%3A50%27%7D%23timecreated%3D%7Bts%20%272009%2D09%2D14%2010%3A05%3A26%27%7D%23hitcount%3D17%23cftoken%3D21755218%23cfid%3D405%23
      Content-Type: application/x-www-form-urlencoded
      Content-Length: 12
      ds=PRESCRIBE
      
      HTTP/1.x 200 OK
      Date: Mon, 14 Sep 2009 17:23:25 GMT
      Server: Apache/2.0.63 (Unix) DAV/2 JRun/4.0 mod_perl/2.0.0 Perl/v5.8.4
      Set-Cookie:
      FGLOBALS=urltoken%3DCFID%23%3D405%26CFTOKEN%23%3D21755218%23lastvisit%3D%7Bts%20%272009%2D09%2D14%2010%3A23%3A26%27%7D%23timecreated%3D%7Bts%20%272009%2D09%2D14%2010%3A05%3A26%27%7D%23hitcount%3D18%23cftoken%3D21755218%23cfid%3D405%23;expires=Wed,
      07-Sep-2039 17:23:26 GMT;path=/
      Keep-Alive: timeout=15, max=100
      Connection: Keep-Alive
      Transfer-Encoding: chunked
      Content-Type: text/html; charset=UTF-8


      *Four*
      -----
      I have modified the county.cfm page so that line 1 is a dump of the session and form structures.

      <cfdump var="#session#"><cfdump var="#form#" label="AppFlow.cfm"><cfabort>


      *Conclusion*
      -----
      Can anybody provide any insight on how selecting a value in the above form will change the value of the "ds" key in the session structure without any visible action code?

      I am flabbergasted and astonished.  I have never seen behavior like this.

       

      P.S.

      I spent 15 minutes fighting with this interface on what should have been a simple cut and past operation.

       

      Every time I wanted to highlight a block of text as code, it would hightlight the entire post, even though I had only selected a portion of it to be highlight until I put a new return before and after what I wanted to highlight.

       

      Then the list block of code highlight I wanted to delete an extra line return at the beginning, but whenever I did, it would delete the entire block.  I had to cut the line, delete the block and past the line back in.

       

      "Good Grief" to quote that myter to all lost souls, Charles Brown.