rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: bobwolfson on January 14, 2016, 07:24:22 PM

Title: "Bad Session" on both New Folder and Rename
Post by: bobwolfson 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?

Title: Re: "Bad Session" on both New Folder and Rename
Post by: Mars on January 14, 2016, 11:15:34 PM
all version are here --> http://sourceforge.net/projects/hfs/files/HFS/
Title: Re: "Bad Session" on both New Folder and Rename
Post by: bmartino1 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/

Title: Re: "Bad Session" on both New Folder and Rename
Post by: LeoNeeson 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.......
Title: Re: "Bad Session" on both New Folder and Rename
Post by: rejetto 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