rejetto forum
Software => HFS ~ HTTP File Server => Beta => Topic started by: rejetto on February 07, 2009, 07:07:25 PM
-
here come some bugfixes
download @ www.dovedove.it/hfs/hfs222.exe
what's new
- "%%" will hang the template
- remotely deleting files will create an empty descript.ion (since build #221)
- ghosts of post variables were hunting our macros http://www.rejetto.com/forum/index.php?topic=6570.msg1040545#msg1040545
- fixed (once again!) "x-forwarded-for" support http://www.rejetto.com/forum/index.php?topic=5811.msg1040394#msg1040394
- installation of RAWR template was broken in build #221 (because of a bug in {.add folder.} http://www.rejetto.com/forum/index.php?topic=6616.msg1040538#msg1040538
-
Thanks :)
-
- remotely deleting files will create an empty descript.ion (since build #221)
The multiple delete selection with the default template does not work if one of these lines is active
// data.vars.clear();
// data.urlvars.clear();
// data.postVars.clear();
********************************************
With the previous versions which accept the template including the delete, it is not possible to delete a file (by the web page) if this one possesses the equivalent md5 or if the option to include the password in the url is active
Here were the part of the code source to modify so that it will be possible in any event:
procedure deletion();
var
i: integer;
s, s2: string; //mod by mars
fs: TStringDynArray;
begin
if (conn.request.method <> HM_POST)
or (data.postVars.values['action'] <> 'delete')
or not accountAllowed(FA_DELETE, conn, f) then exit;
fs:=NIL;
for i:=0 to data.postvars.count-1 do
if sameText('selection', data.postvars.names[ i ]) then
begin
s:=decodeURL(data.postvars.valueFromIndex[ i ]);
// URL example : http://user:%70%61%73%73%77%6F%72%64@127.0.0.1/a/hfs-test.txt#!md5!a4a556s54az545sd4q54da54d545d45a4d5az
if pos('#!md5',s)>0 then s:=chop('#!md5',s); //remove md5 mars
if pos('://',s)>0 then chop('://',s); //remove 'http(s)://' mars
if pos(':',s)>0 then chop('@',s); //remove login+password mars
repeat
s2:=chop('/',s);
if s='' then begin s:=s2; break; end; //extract and give only the filename mars
until false;
if ansiEndsStr('/', s) then setLength(s, length(s)-1); // folders' url
if anycharIn('\/', s) then continue;
s:=f.resource+'\'+s;
if not moveToBin(s) then
deleteFile(s);
// delete related files
if not moveToBin(s+'.md5') then
deleteFile(s+'.md5');
if not moveToBin(s+COMMENT_FILE_EXT) then
deleteFile(s+COMMENT_FILE_EXT);
addString(s, fs);
end;
removeFilesFromComments(fs);
end; // deletion
-
- fixed (once again!) "x-forwarded-for" support http://www.rejetto.com/forum/index.php?topic=5811.msg1040394#msg1040394
Works...thanks ;)
-
if the resource of the real folder in VFS has a space into his name, the "open it F8" can't work
WARNING : '"' is ' + " + '
the solution is:
procedure TmainFrm.Openit1Click(Sender: TObject);
begin
if selectedFile = NIL then exit;
mainfrm.add2log(selectedfile.resource);
exec('"'+selectedfile.resource+'"')
end;
if the external editor has a space into the name, he is not launched with F6 or ALT+F6
the solution is:
function getTplEditor():string;
begin
result:=or_([
nonEmptyConcat('', tplEditor, ''), //WARNING : '' is ' + '
loadregistry('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe', '', HKEY_LOCAL_MACHINE),
'notepad.exe'
])
end;
and not
nonEmptyConcat('"', tplEditor, '"'),
the bug appear with this external editor path :
C:\Program Files\Notepad ++ aa\notepad.exe
C:\Program Files\Notepad aa\notepad.exe
the last one
with the macro EXEC the good syntax is:
{.exec|C:\Program Files\Notepad++\notepad++.exe|"c:\program files\filename is allowed.txt".}
every time the full path cointain a space you have to add "..."
{.exec|C:\Program Files\Notepad++\notepad++.exe|c:\program files\filename not allowed.txt.} is not allowed
the file name can include a pipe with this syntax:
{.exec|C:\Program Files\Notepad++\notepad++.exe|{:"c:\program files\filename with a | pipe is allowed.txt":}.}
-
if the resource of the real folder in VFS has a space into his name, the "open it F8" can't work
fixed, thanks
if the external editor has a space into the name, he is not launched with F6 or ALT+F6
mmm, no, it is launched correctly, i just tested.
nonEmptyConcat('', tplEditor, ''),
you want to append empty strings, why you should do it?
non-sense :)
with the macro EXEC the good syntax is:
{.exec|C:\Program Files\Notepad++\notepad++.exe|"c:\program files\filename is allowed.txt".}
every time the full path cointain a space you have to add "..."
yes, this is a limit due to the fact that ALL command line parameters are passed in that macro parameter, and space is used to separate them.
{.exec|C:\Program Files\Notepad++\notepad++.exe|c:\program files\filename not allowed.txt.} is not allowed
to save some asses, i will test if the parameter exists on the file system, and in such case i will automatically add "quotes". this works only if the file exists.
the file name can include a pipe with this syntax:
{.exec|C:\Program Files\Notepad++\notepad++.exe|{:"c:\program files\filename with a | pipe is allowed.txt":}.}
exactly... this is also reported by the wiki
-
Quote
if the external editor has a space into the name, he is not launched with F6 or ALT+F6
mmm, no, it is launched correctly, i just tested.
create this folder
"C:\Program Files\Notepad aa"
and put a copy of notepad.exe (from c:\windows) in this
change the editor to it and make a test, notepad.exe is not launched
tested with the official build 222
function getTplEditor():string;
begin
result:=or_([
tplEditor,
loadregistry('SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\notepad++.exe', '', HKEY_LOCAL_MACHINE),
'notepad.exe'
])
end;
if you like
-
create this folder
"C:\Program Files\Notepad aa"
and put a copy of notepad.exe (from c:\windows) in this
ok, thank you, this reproduces the problem.
but the bug is in function nonQuotedPos().
the solution you suggested would break working cases.
i'm working to fix it right now.
-
good boy , Fysack would have said: i love you ;D
-
The multiple delete selection with the default template does not work if one of these lines is active
// data.vars.clear();
// data.urlvars.clear();
// data.postVars.clear();
thanks, i had to move them to another place.
With the previous versions which accept the template including the delete, it is not possible to delete a file (by the web page) if this one possesses the equivalent md5 or if the option to include the password in the url is active
thanks.
fixed in next build.
-
I would also like to say, I am using your software on a Beta Build of Windows 7, and am seeing no real issues at all with the two softwares together.
I am also using this within the PS3 system so far, and everything works as well.
-
Well, the user limit problem I had in the build 221 is somehow gone using this build.
Now, the problem right now is the RAWR-design template's shoutbox.
I tried to post shout and it's failed to submit my shout using this build and working fine when I switch to build 219.
Haven't tested yet with build 220 and 221.
Anyone having the same problem?
My server is running locally in my university's network. If that helps.
-
@uniten
it will be fixed in next build
@fportal
thank you for reporting :)