Author Topic: Testing build #222  (Read 11926 times)

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Testing build #222
« on: February 07, 2009, 01: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 

Offline thexfile

  • Occasional poster
  • *
  • Posts: 11
    • View Profile
Re: Testing build #222
« Reply #1 on: February 07, 2009, 03:52:33 PM »
Thanks  :)

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1731
    • View Profile
Re: Testing build #222
« Reply #2 on: February 07, 2009, 05:47:24 PM »
Quote
- 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:
Quote
    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

« Last Edit: February 08, 2009, 05:11:19 PM by mars »

Offline cmatte

  • Experienced poster
  • ***
  • Posts: 31
    • View Profile
    • ErMeglio WebSite
Re: Testing build #222
« Reply #3 on: February 07, 2009, 07:21:56 PM »

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1731
    • View Profile
Re: Testing build #222 bug with filename which content space
« Reply #4 on: February 08, 2009, 03:48:01 PM »
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:
Quote
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:
Quote
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
Quote

  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":}.}



« Last Edit: February 08, 2009, 05:21:56 PM by mars »

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Testing build #222
« Reply #5 on: February 08, 2009, 05:28:42 PM »
if the resource of the real folder in VFS has a space into his name, the "open it F8" can't work

fixed, thanks

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.

Quote
nonEmptyConcat('', tplEditor, ''),

you want to append empty strings, why you should do it?
non-sense :)

Quote
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.

Quote
{.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.

Quote
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

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1731
    • View Profile
Re: Testing build #222
« Reply #6 on: February 08, 2009, 05:35:28 PM »
Quote
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

Quote
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
« Last Edit: February 08, 2009, 05:37:15 PM by mars »

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Testing build #222
« Reply #7 on: February 08, 2009, 05:58:29 PM »
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.

Offline Mars

  • Operator
  • Insane poster
  • *****
  • Posts: 1731
    • View Profile
Re: Testing build #222
« Reply #8 on: February 08, 2009, 06:04:19 PM »
good boy , Fysack would have said: i love you ;D

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Testing build #222
« Reply #9 on: February 08, 2009, 07:50:31 PM »
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.

Quote
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.

Offline fPortal

  • Occasional poster
  • *
  • Posts: 14
    • View Profile
Re: Testing build #222
« Reply #10 on: February 08, 2009, 08:49:22 PM »
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.
« Last Edit: February 08, 2009, 08:53:16 PM by fPortal »

UNITEN

  • Guest
Re: Testing build #222
« Reply #11 on: February 09, 2009, 04:36:14 AM »
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.

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12778
  • Country: it
    • View Profile
Re: Testing build #222
« Reply #12 on: February 09, 2009, 05:28:45 AM »
@uniten
it will be fixed in next build
@fportal
thank you for reporting :)