Author Topic: "Bad Session" on both New Folder and Rename  (Read 2102 times)

0 Members and 1 Guest are viewing this topic.

Offline bobwolfson

  • Occasional poster
  • *
  • Posts: 10
    • View Profile
"Bad Session" on both New Folder and Rename
« on: January 14, 2016, 07:24:22 PM »
In both 2.3f and 2.3g, I get a "Bad Session" error whenever I try to create a New Folder or Rename something.

I'm running the server under Win 7.  The error occurs whether I browse to the server from the same machine or a different one.  It happens under both Chrome and Firefox.

I've read other posts in regards to the session cookie, "HFS_SID_".  I've tried inserting code in the template for 2.3f to delete that cookie if the AJAX call comes back "bad session":

         if (res !== "ok") {
            alert("{.!Error.}: " + ">>>" + res + "<<<" );
            if (res.substring(0,11) === 'bad session') {
                delCookie('HFS_SID_');
                location.reload();

I've tried clearing the cookie, closing the browser, closing the server, and trying again with no luck.  I can't find any situation where it works.

Other posts say it worked in 2.3e, but I can't find that version to download.

Is this fixable?


Offline Mars

  • Operator
  • Tireless poster
  • *****
  • Posts: 1899
    • View Profile
Re: "Bad Session" on both New Folder and Rename
« Reply #1 on: January 14, 2016, 11:15:34 PM »

Follow members gave a thank to your post:


Offline bmartino1

  • Tireless poster
  • ****
  • Posts: 880
  • I'm only trying to help i mean no offense.
    • View Profile
    • My HFS Google Drive Shared Link
Re: "Bad Session" on both New Folder and Rename
« Reply #2 on: January 15, 2016, 03:25:11 PM »
i have seen this issue with other users, but never encountered it...

http://www.rejetto.com/forum/html-templates/troubleshooting-hfs-cookie-issues-on-rename-in-the-default-template/

http://www.rejetto.com/forum/bug-reports/'error-bad-session'-when-creating-folders-in-2-3f/
*http://www.rejetto.com/forum/html-templates/troubleshooting-hfs-cookie-issues-on-rename-in-the-default-template/5/?wap2
(which i thought was fixed in 2.3f ...)
try clearing the cookie cashe on the two machine before starting a current version of hfs.

https://kb.iu.edu/d/ahic

--------------------------------------

http://www.rejetto.com/forum/hfs-~-http-file-server/percentnewpercent-resolved-cookies-are-not-necessary/

I'm only trying to help i mean no offense.
thank you for your time and patience,
Bmartino1

Offline LeoNeeson

  • Tireless poster
  • ****
  • Posts: 586
  • Solitario...
    • View Profile
    • twitter.com/LeoNeeson
Re: "Bad Session" on both New Folder and Rename
« Reply #3 on: January 16, 2016, 04:33:40 AM »
I bet the problem it's on your browser, who doesn't clean the cache properly. Cleaning the cache may be tricky, especially on new browsers (since they are configured by default to leave a lot of junk in the cache). You must have a 100% clean cache, to be sure this is a HFS problem.

Why don't you try using another browser, like for example, K-Meleon? (especially the portable version, so you can manually clean the cache, in case you need)

http://kmeleonbrowser.org/ > K-Meleon v75.1 (2015-09-19) [Portable version]
http://sourceforge.net/projects/kmeleon/files/k-meleon/75.1/K-Meleon75.1.7z/download

I don't know, but this may help... ;)
Cheers.......
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
• I'm open to help and share any file you may need (just ask me) ;)

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12953
    • View Profile
Re: "Bad Session" on both New Folder and Rename
« Reply #4 on: January 16, 2016, 08:06:30 PM »
do you see "customized template" in the bottom bar of HFS ?

recently i added this instruction to the template that deletes the bad cookie
{.cookie|HFS_SID_|value=|expires=-1.}

you should have it in yours