rejetto forum

Software => HFS ~ HTTP File Server => Bug reports => Topic started by: smaragdus on October 18, 2015, 02:28:32 AM

Title: Account names
Post by: smaragdus on October 18, 2015, 02:28:32 AM
Hello,

I registered to submit an issue.

The last version of HFS which works fine and according to my expectations is 2.3d Build 292. All later versions (2.3e Build 293, 2.3f Build 294 and 2.3g Build 295- I tested them all) are plagued by one common problem- when I try to create a new user name it is capitalized and there is no way to type it in lower case. This is very annoying and I will stick to version 2.3d Build 292 until the issue is fixed- it is cumbersome and unhandy to delete the latest version, replace it with 2.3d Build 292, create an account, then delete it again and use the latest one again.

In my opinion the most important feature which HFS lacks is an option to sign out.

Regards
Title: Re: Account names
Post by: LeoNeeson on October 18, 2015, 10:29:10 AM
Hi, and welcome! :) Thanks for reporting this issue about the username. I confirm the bug, the username is being forced to be capitalized. And about HFS lacking an option to sign out (or logout), it's not directly an HFS issue, since it's a limitation of the "HTTP/1.1" protocol (which HFS uses).

> More info about having a "logout":
Doing a Google search (http://www.google.com/search?q=HTTP%2F1.1+logout+workaround), I did found a possible workaround (here (http://stackoverflow.com/questions/18085883/php-to-mimick-a-logout-feature-for-http-basic-auth)) which suggest "passing wrong credentials (username/password) to the browser, so the browser will try to use the most recently passed credentials, and will forget the previous correct ones, giving the user a new option to login again. This may work fine, until the user just hits the back button in your browser." /That's what they said.

> My own experience/test: I tried it using Firefox, and it does NOT work. It may work with some other browser, but it is unreliable and troublesome. I don't know if passing an invalid 'cookie' does something similar.

So, "logout" is not possible, you have to close your browser.
Title: Re: Account names
Post by: bmartino1 on October 18, 2015, 04:07:10 PM
agreed here leo, i can confirm that the user are cap...

i posted to some one regarding a way to do "signout stuff"
i've found php (the 1 of many solutions that leo also posted...) better to do that with then the http protcal stuff...

Unfortunaly, HFS done't natively support php, and there talk on the fourm of getting bits and piece working, unsure of how far it went...

the beter one that might be able to work with hfs / is java based:
https://wiki.jasig.org/display/casum/single+sign+out

some where on the forum i wen tin to detail with stuff on how to do this
(programing html code wise, not HFS in the program...) rejetos words to that post was maybe in hfs 3.0

http://www.rejetto.com/forum/hfs-~-http-file-server/old-question-but/msg1059657/#msg1059657
Title: Re: Account names
Post by: rejetto on October 18, 2015, 09:26:02 PM
i was not aware of this problem.
will fix it soon.
Title: Re: Account names
Post by: Mars on October 18, 2015, 09:48:59 PM
HI Rejetto, be Happy  ;)

problem fixed by moving code in optiondlg.pas

renamed with low character working,
 when aucountsbox is selected, press a key  a to z select  user in list

Quote
procedure ToptionsFrm.accountsBoxKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
  var
  s, i, ir, n: integer;
  keychar:char;
begin
if shift = [] then
   case key of
     VK_F2: renaccountBtn.click();
    VK_INSERT: addaccountBtn.click(); // mod by mars
    VK_DELETE: deleteAccount();
    end;
{mod by mars}
if shift = [ssAlt] then
  case key of
    VK_UP: upBtn.click();
    VK_DOWN: downBtn.click();
    end;
{/mod}

{/ accountsBoxKeyPress moved here/} // mod by mars
keychar:=upcase(char(key));
if keychar in ['0'..'9','A'..'Z'] then
  begin
  s:=accountsBox.ItemIndex;
  n:=length(tempAccounts);
  for i:=1 to n-1 do
    begin
    ir:=(s+i) mod n;
    if keychar = upcase(tempAccounts[ir].user[1]) then
      begin
      selectAccount(ir);
      exit;
      end;
    end;
  end;
end;

procedure ToptionsFrm.accountsBoxKeyPress(Sender: TObject; var Key: Char);
var
begin
end;
Title: Re: Account names
Post by: rejetto on October 18, 2015, 09:50:44 PM
ok, next version will have this sorted out
Title: Re: Account names
Post by: rejetto on October 18, 2015, 09:55:13 PM
ah, sorry mars, we were working at the same time.
i worked on a different solution, having a flag to know when you are editing.
Just out off curiosity: does your solution work well while you are renaming an account? doesn't it search the list while you rename?
Title: Re: Account names
Post by: Mars on October 18, 2015, 10:04:26 PM
 every one can download my compiled hfs file at this link to test

http://dl.free.fr/hz8DwZxl4

during editing  sing Maj letters  select another account  without exiting the edit

not good   


new link     http://dl.free.fr/nx1iKWdFB

new version   ;D ;D ;D ;D ;D

Quote
procedure ToptionsFrm.accountsBoxKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
  var
  s, i, ir, n: integer;
  keychar:char;
begin
if accountsbox.IsEditing then exit;    // mod by mars
if shift = [] then
   case key of
     VK_F2: renaccountBtn.click();
    VK_INSERT: addaccountBtn.click(); // mod by mars
    VK_DELETE: deleteAccount();
    end;
{mod by mars}
if shift = [ssAlt] then
  case key of
    VK_UP: upBtn.click();
    VK_DOWN: downBtn.click();
    end;
{/mod}
{/ accountsBoxKeyPress moved here/}
  keychar:=upcase(char(key));
  if keychar in ['0'..'9','A'..'Z'] then
   begin
   s:=accountsBox.ItemIndex;
   n:=length(tempAccounts);
   for i:=1 to n-1 do
     begin
     ir:=(s+i) mod n;
     if keychar = upcase(tempAccounts[ir].user[1]) then
       begin
       selectAccount(ir);
       exit;
       end;
     end;
   end;
end;
Title: Re: Account names
Post by: Dave987 on October 19, 2015, 01:33:55 PM
I'll give it a try.  The odd thing was, not all usernames worked like this.  Some needed to be entered to log in with all caps, others could be entered with or without caps.  I'm still on f, and only one of the four logins I have set must be entered in all caps.  Anyway, I hope this helps.  Thanks!
Title: Re: Account names
Post by: rejetto on April 25, 2016, 02:56:46 PM
http://www.rejetto.com/forum/hfs-~-http-file-server/2-3h-preview/
Title: Re: Account names
Post by: Fysack on September 30, 2017, 11:02:56 PM
hardcore brothers strikes again