rejetto forum
Software => HFS ~ HTTP File Server => Bug reports => Topic started by: mchurch13 on September 10, 2015, 12:24:50 AM
-
I did not notice this problem myself but was notified by a friend I share files with. I am running HFS under windows. The problem is active in Win7/8.1/10. HFS version is 2.3f (build 294).
There are 2 problems actually. I have tried the default and various other custom templates. Some have these issues, some do not.
The first problem is with file sorting, either by clicking a column heading or alternate method depending on the template used. Sorting in the root directory seems fine but as soon as I move down into any other directory, trying to sort ends up in a 404 not found server error.
The second problem is downloading files into a HFS created archive. Once again, this works fine in the root directory but in any other directory it results in a 404 not found server error.
Both of these issues are found active in the default template. Some of the custom templates I have tried have either one or the other or both. The issues are not active in HFS 2.3 beta (build 287).
<edit> I found version 2.3e SSL 293i. Neither of these issues are apparent in this version either. Which is the version I will use (since I also like the choice of the built in templates). The Black & Gold is great !
-
first problem: doesn't happen here. I think you have a bad template running. What's the URL in your browser when you get the 404 error ?
second: i expect it to be the same problem, actually.
-
If it is a template problem, it is also in the default built in template....
Screen shot 1 is when I try to sort by clicking a column heading.
Screen shot 2 is when I try to download files in an archive.
-
Here is a shot from another build.... I see now that the address somehow is getting that extra '20 in it, resulting in a not found...
-
There you have it - that '20 should actually be a %20 (HTTP-encoded space). As to the why, dunno. Try force-reloading the default template.
-
i created a folder with that name, and had no problem.
i suspect you are not truly using the default template.
can you tell me if, with the official HFS, you see a "customized template" in the bottom bar of the HFS window ?
If you are not sure where to look, just post a screenshot of the HFS window (when you have the problem)
-
..........
...
expert mode
hfs > menu > html template > Restore Default
redownload hfs and start from scratch...
----------------------------------
ON ANOTHER NOTE!...
i was going to upload and post the default template for the latest build here for use..., but i'm receiving the file not found error to edit the default template...
hfs can't find template...
see picture...
its there / somewhere and hfs is using it as it is loding properly in chrome on windows 10 pro x64
-
I noticed the same sorting problem in the default template using HFS 2.3f (b 294) in Windows 7.
I installed a freshly downloaded HFS 2.3f (294) and created a new VFS using real folders.
The VFS had the folders named as follows:
New folder
New folder (2)
New<some valid file name character>folder<some valid file name character>
Each folder contained 3 zero byte files named:
New Text Document.txt
New Text Document (2).txt
New Text Document (3).txt
From HFS, I opened the default template in Firefox browser. All folders listed fine in the home page.
I opened "New folder" and the 3 files listed fine.
The files could be sorted by selecting any of the list box's headers: Name, Extension, Size, Timestamp, Hits (all hit counts were zero)
I opened "New folder (2)" and the 3 files listed fine.
Selecting any header for sorting displayed the "Not Found" page.
I played around with New<some valid file name character>Folder<some valid file name character>, substituting various
valid non-alphanumeric characters. I recorded the following results:
When 2 or more of the following characters are used, sorting results in a "Not Found" page display.
(I'll spell the characters to avoid confusion)
space, apostrophe, right and left braces, right and left square brackets, ampersand, accent, percent, caret
The following characters DID NOT cause a sort problem:
exclamation, tilde, comma, hyphen, underscore, equal, plus, at, dollar, semicolon, period
I recorded a few resulting URLs of successful file sorts as follows:
Folder name = New folder
resulting url (as displayed in Firefox) = http://localhost/New folder/
Folder name = New~folder%
resulting url = http://localhost/New~folder%25/?sort=t
Folder name = New.folder&
resulting url = http://localhost/New.folder%26/?sort=s
I recorded a few URLs on the "Not Found" page after changing the folder's name and reloading the HFS default template each time.
Here are samples:
Folder name = New folder (2)
resulting url on "Not Found" page (as displayed in Firefox) = http://localhost/New'20folder (2)/?sort=e
Folder name = New folder&
resulting url on "Not Found" page = http://localhost/New'20folder&/?sort=n
Folder name = New%folder&
resulting url on "Not Found" page = http://localhost/New'25folder&/?sort=t
Folder name = New]folder&
resulting url on "Not Found" page = http://localhost/New'5Dfolder&/?sort=s
It appears that with 2 or more certain valid file name, non-alphanumeric characters in a folder name, the sort function
substitutes ' for % for the first non-alphanumeric character's escape which results in a "Not Found" display.
Like the OP, I found this behaviour is not present in HFS 2.3E
-
ok, i reproduced the problem, i will working on it soon
-
Hello, joining you all for this problem I'm having too. I don't remember having this issue with the previous HFS version, but I might be wrong. I can't archive (i.e. download) files because the directory from which I want to download contains "é". It works when renaming the directory without this accent. Otherwise, it leads to this 404. Hope that helps repairing.
-
i'm sorry you are waiting so long for this fix guys, it's that i rarely have the chance to work on HFS, as even my weekends are busy preparing an apartment for me and my girlfriend. :)
The problem was introduced because of a security fix in the latest version, so if you revert to the previous version it disappears, but the security problem will be there.
Now back to work, or i will never finish it
-
I guess the problem would be sort of solved if you'd put the link towards the previous version.
-
agreed, but i'm unable to recover 2.3e
how ever, using the internet:
https://archive.org/web/
on a previews date, it did record and save 2.3d
so here is hfs 2.3d
here is a download link:
https://web.archive.org/web/20150317085612/http://rejetto.com/hfs/?f=dl
hopefully the next releases of hfs will fix this.
-
@bmartino1: You can find v2.3e on SourceForge.net (http://sourceforge.net/projects/hfs/files/HFS/2.3e/), along to many old versions. But I think we must wait Rejetto, since he said he is working on this (we have to be patient). It's too soon to have it fixed, it will take some time... :)
-
i'm sorry i didn't suggest this before because of security problems in the previous version, but it's not a concern for everyone and i'm not going to stop you.
Who has the "keep old version" option enabled (i think it is by default), and didn't update manually but let HFS handle it, then they have "revert to previous version". All this inside Menu > Updates.
Anyway, you will always find every version on sourceforge.
http://sourceforge.net/projects/hfs/files/HFS/2.3e/
-
the error "404 not found" here comes from this line in scriptlib.pas
s:=reReplace(s,'%([-a-z0-9]+%)',''$1', 'mi');
Regular Expression is the problem
/%([-a-z0-9]+%)/
% matches the character % literally
1st Capturing group ([-a-z0-9]+%)
[-a-z0-9]+ match a single character present in the list below
Quantifier: + Between one and unlimited times, as many times as possible, giving back as needed [greedy]
- the literal character -
a-z a single character in the range between a and z (case sensitive)
0-9 a single character in the range between 0 and 9
% matches the character % literally
I guess the purpose of this mask is to replace a variable of type %my_var% by its equivalent 'myvar
the problem is that detection also includes normally separated pairs of %xx
"New folder (2).txt" --> converted in url to "New%20folder%20(2).txt"
by applying the mask:
"New%20folder%20(2).txt" becomes "New'folder20(2).txt"
it's will be necessary to ignore replace when % is followed by a number, because a hfs var always begin by a non numeric char
should be taken into account in the new version the following scenario:
"new %myvar%20 folders" -->> "new 'myvar20 folders"
here, %20 is not a space character and have not to be converted
changing somewhat groping the mask could give a result that seems correct, but will require the approval of any modification to validate rejetto
-
thanks mars, but i already fixed that problem.
Sadly, the starting-with-a-number is not a solution, because some (non-ASCII) characters start with a letter as well.
I'm now fixing this other problem before publishing, to avoid making many updates
http://www.rejetto.com/forum/bug-reports/descript-ion-and-comment-not-cleaned-up-after-moving-file/