rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: r][m on March 22, 2011, 05:32:31 PM

Title: can change password
Post by: r][m on March 22, 2011, 05:32:31 PM
I've noticed something strange, not only in this test version, but in
all the more recent versions.
I delete the group "can change password" because I don't need it.
Then I save options to file and save vfs.
When I restart HFS it comes back. Also when I add user I get
an error message and cant name user anything but "new user".
If I go back to 240 every thing works as expected.
I can add a new user by web page however.

Not sure if this is really something in HFS or Wine/Ubuntu, but it is odd
that an older build works.

Access violation at address 004E0238 in module 'hfs-rim.exe'. Read of address 00000004
HFS 2.3 beta (276)
----------------------------------------------------------------
System   : Windows XP Professional, Version: 5.1, Build: A28, "Service Pack 3"
Processor: AMD, AMD Athlon(tm) 64 Processor 3800+, 1000 MHz MMX
Display  : 1280x1024 pixels, 32 bpp
----------------------------------------------------------------
----------------------------------------------------------------
Product Versions

hfs-rim.exe:2.3.0 Build: 0 3/22/2011 12:12:54 AM
hfs240.exe: Build: 0 1/9/2011 4:53:26 AM
Title: can change password
Post by: SilentPliz on March 22, 2011, 06:23:56 PM
Hi r][m! :)

I delete the group "can change password" because I don't need it.
Then I save options to file and save vfs.
When I restart HFS it comes back.

This is normal, the command to create the account "can change password" is included in the default template.

Code: [Select]
[special:import]
{.new account|can change password|enabled=1|is group=1|notes=accounts members of this group will be allowed to change their password.}

It is created (if it does not already exist) when the template is loaded.

If you don't need it, better is not to touch it.

If you use a personal template, without this command to create this group, normally this group is no longer created when deleted.

Also when I add user I get
an error message and cant name user anything but "new user".
......
I can add a new user by web page however.
......
Not sure if this is really something in HFS or Wine/Ubuntu, but it is odd
that an older build works.

These are bugs that I also noticed with Wine / Linux Mint (also based on Ubuntu).

These bugs do not seem to exist on Windows OS.

On Windows, HFS sometime crashes when you delete multiple accounts.

http://www.rejetto.com/forum/index.php/topic,9484.msg1053577.html#msg1053577
Title: can change password
Post by: r][m on March 23, 2011, 05:13:49 AM
Hi SilentPliz
Thanks for the reply.
I do use my own template, so I shouldn't see "can change password" again, but I do.
I had wondered if the error on adding user was a Ubuntu/Wine thing, but its still
strange that build 240 doesn't do it?
Title: can change password
Post by: SilentPliz on March 23, 2011, 10:42:40 AM
I had wondered if the error on adding user was a Ubuntu/Wine thing, but its still
strange that build 240 doesn't do it?


There have been changes in "accountsbox" since the version 240 ... that's probably that.
Title: can change password
Post by: rejetto on March 23, 2011, 05:01:19 PM
build #240 is so far from #276, please give me a narrower range.

Quote
I do use my own template, so I shouldn't see "can change password" again, but I do.

are you sure there's no such group in your template?
Title: can change password
Post by: r][m on March 24, 2011, 06:49:30 AM
are you sure there's no such group in your template?
Searched template and all hfs.diff.tpl. No "can change password" found.
Did find "change password" and changed it, and  "Password Change", also
several "password".
Ever time I restart HFS it comes back, as far back as build 240.

The add user error/problem starts with build 269. Build 267 and back don't do it.
Don't think there was a 268?
Title: can change password
Post by: SilentPliz on March 24, 2011, 10:55:18 AM
Hi! :)

I did some tests under Wine / Linux Mint:

The only way for the group "can change password" not to be recreated is renaming your own template as: "default.tpl" and reload it into HFS, then save the options.

If the template is named differently, it works, but at the opening of HFS, the group "can change password" is still recreated. hfs.ini file is correct however.

It is as if, on some points, the internal HFS template (named default.tpl) had priority.

So, in short, for this to work normally at this time ... you must rename your own template "default.tpl" when using Wine / Linux.
Title: can change password
Post by: r][m on March 24, 2011, 04:30:08 PM
@ SilentPliz
Do you have the error message with Wine / Linux Mint when adding new user,
as I do from build 269 forward?
Title: can change password
Post by: SilentPliz on March 24, 2011, 04:36:01 PM
 :)

Yes I've the same problem. :-\
Title: can change password
Post by: SilentPliz on March 24, 2011, 04:43:36 PM
...

I can not say since which version, I do not often used HFS with Linux. But all recent beta that I used produced the same bug.
You have to be right when you speak to the 269 version ... it's probably from there which it started.
Title: Re: can change password
Post by: rejetto on March 24, 2011, 06:46:36 PM
ok, i tried to fix the bug, but i need some pre-testing because i fear side-effects.
but don't be scared, they would be harm-less, like not loading a template.
i just can't give it to 10k people without a little testing.
Please redownload the same url, and give me a feedback
http://www.dovedove.it/hfs-rim.exe
Title: Re: can change password
Post by: SilentPliz on March 24, 2011, 07:08:24 PM
I tested under Wine / Linux mint.

- The bug seems fixed:

Tested with a personal template (without can change password group):
The group "can change password" is not recreated after deletion.
Whatever is the name of the template; saved in the registry or in hfs.ini file

- The same good result was also obtained with only the default template.

Nota: my computer did not explode, and no deaths occurred (human or animal) during the experiment. ;)

Bravo ! 8)
Title: Re: can change password
Post by: r][m on March 25, 2011, 06:11:42 AM
@ Rejetto
The "can change password" is gone.

I don't know if this test build was to also fix the add user error from 269,
but I still have it here?
 
I click the add button I get the error message, then account " new user" is
created, then when I try to rename it I get the error again.
The good news is I can delete it  ;D

So far nothing exploded or died here either, so I'll stay on this build
over the next days.
Title: Re: can change password
Post by: rejetto on March 25, 2011, 11:36:58 AM
don't you get a longer form of the error report with the last build i gave you?
i need it
Title: Re: can change password
Post by: SilentPliz on March 25, 2011, 01:28:29 PM
Hi Boss! :)

Done!

Title: Re: can change password
Post by: r][m on March 25, 2011, 03:51:31 PM
My exception logs, if needed.
I had none for delete account.
Mine are wine/linux.
Title: Re: can change password
Post by: SilentPliz on March 25, 2011, 04:10:43 PM
@r][m

Delete accounts is OK for me too with linux.

This only occurs on Windows XP when I try to delete a list of accounts, one by one... and it's pretty random.
Title: Re: can change password
Post by: r][m on March 26, 2011, 05:05:44 AM
@ SilentPliz
Thanks for the help and confirming this.

Guess solving this is up to the Boss now?  ;)
Title: Re: can change password
Post by: rejetto on March 29, 2011, 05:16:44 PM
i'm sorry guys, but these logs miss some information.
Maybe it's because of Wine.
if you re-do it with the official #276 i may be able to make use of the numbers.
Title: Re: can change password
Post by: SilentPliz on March 29, 2011, 05:36:01 PM
Voila! ;)

I'm sick, I'll go to bed!


Edit: created with the current build 276 decompressed with UPX
Title: Re: can change password
Post by: r][m on March 30, 2011, 06:18:55 AM
And mine with 276
Title: Re: can change password
Post by: rejetto on March 30, 2011, 04:11:45 PM
for some straneg reason r][m's logs are much shorter, but the error is the same.
and even it's the same between "add" and "rename".
Indeed, add is just a "create bulk" + "rename".
I can't fix this problem, so i will try a workaround.
Let me know if it works: http://www.sendspace.com/file/vww8ah



SP and programmers may be interested in knowing that the line issuing the error is not in HFS' code but in delphi's one.
After renaming, this line in HFS is executed
old:=@tempAccounts[item.Index].user;

reading item.index, and reaching the problem in method getIndex() at line
  if Owner.Owner.OwnerData then

here, apparently, a reference/pointer is wrong under Wine, while it's always correct on native Windows. It's about a chain of ownership, the item belongs to a list of items, belonging to the widget in turn.
Title: Re: can change password
Post by: SilentPliz on March 30, 2011, 05:24:37 PM
for some straneg reason r][m's logs are much shorter, but the error is the same.
and even it's the same between "add" and "rename".
Indeed, add is just a "create bulk" + "rename".
I can't fix this problem, so i will try a workaround.
Let me know if it works: http://www.sendspace.com/file/vww8ah


My file was longer, I had "unzipped" the executable before using it.
-----------

Your new solution does not work better ... always the same bugs.

Here too I have "unzipped" hfs.exe for more informations
Title: Re: can change password
Post by: Mars on March 30, 2011, 05:55:08 PM
@rejetto
What do you think about to change 'old' defined as pointer to string, as STRING

Quote
procedure ToptionsFrm.accountsBoxEdited(Sender: TObject; Item: TListItem; var S: String);
var
  old: string;
  err: string;
  i: integer;
begin
old:=tempAccounts[item.Index].user;
if not validUsername(s) then
  err:='Invalid username'
else if userExists(s, accountsBox.itemIndex) then
  err:='Username already used'
else
  err:='';

if err > '' then
  begin
  msgDlg(err, MB_ICONERROR);
  s:=old;
  exit;
  end;
// update linkings
for i:=0 to length(tempAccounts)-1 do
  replaceString(tempAccounts[i].link, old, s);
tempAccounts[item.Index].user:=s;
end;
Title: Re: can change password
Post by: rejetto on March 30, 2011, 06:13:56 PM
please try this other workaround.
http://files.chemicalservers.com/download.php?code=9ETj62vRd&fn=hfs.exe

@mars
nope, if you read closely, the problem is "item.index", so your suggestion won't solve the problem.
But i accept it anyway because i think the added complexity of the pointer is not paying enough.
Title: Re: can change password
Post by: SilentPliz on March 30, 2011, 06:45:08 PM
please try this other workaround.
http://files.chemicalservers.com/download.php?code=9ETj62vRd&fn=hfs.exe

!!! WORKS FINE !!!

 8) 8) 8) 8)

Many thanks! ;)
Title: Re: can change password
Post by: Mars on March 30, 2011, 07:48:01 PM
@mars
nope, if you read closely, the problem is "item.index", so your suggestion won't solve the problem.
But i accept it anyway because i think the added complexity of the pointer is not paying enough.

All right, what shows good that the silly ideas can present certain interest  :D

It restores me of the heart in the work;)
Title: Re: can change password
Post by: SilentPliz on March 31, 2011, 12:22:19 AM
All right, what shows good that the silly ideas can present certain interest

That's what I repeat to myself every day ... and it suits me much... and very often. :D
Title: Re: can change password
Post by: r][m on March 31, 2011, 05:16:00 AM
Works here also.  ;D
Many Thanks, Rejetto, and everyone.

I'll stay on this version over the next days.