Skip to main content
WolfShade
Legend
October 4, 2017
Question

JSESSIONID changing on every click, refresh, form submit, etc.

  • October 4, 2017
  • 1 reply
  • 6840 views

Hello, all,

My boss is working on an addition to our site that has a form to submit that a user can use to submit a complaint.  He is using a custom-made CAPTCHA that is randomly generating a three digit number and setting that to a session variable.  The form handler page then compares what the user entered to the session variable.  But the JSESSIONID is changing on every click, etc., so when the handler gets the form, it's a new session and the values do not match.

What can we do to make this work?

V/r,

^ _ ^

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
October 4, 2017

WolfShade  wrote

But the JSESSIONID is changing on every click,

Do you mean, on every click on the submit button?

WolfShade
WolfShadeAuthor
Legend
October 4, 2017

I mean EVERYTHING.  With F12 on FireFox, showing the cookies, every link click, form submit, page refresh/reload, even if you manually change the URL to another page.  JSESSIONID rotates.  Apparently as a security measure against session hijacking.

But how do I keep session variables persistent if the JSESSIONID is forever changing?

V/r,

^ _ ^

Inspiring
October 4, 2017

Are you actually losing the full session scope on the page refresh? Coldfusion should be dealing with this for you.

If you assign something to session.testvar and then output it to the page, keep refreshing. If it exists on each refresh then its keeping the session fine.

You haven't got any low timeouts set to the session?