mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
fix: unicode problems (accounts)
This commit is contained in:
parent
09abf511ea
commit
99af92cc18
@ -118,7 +118,7 @@ type
|
||||
ver: ansistring;
|
||||
firstByte, lastByte: int64; // body interval for partial requests
|
||||
headers, cookies: ThashedStringList;
|
||||
user,pwd: ansistring;
|
||||
user,pwd: string;
|
||||
end;
|
||||
|
||||
ThttpPost = record
|
||||
@ -1055,6 +1055,7 @@ procedure ThttpConn.processInputBuffer();
|
||||
function parseHeader():boolean;
|
||||
var
|
||||
r, s: ansistring;
|
||||
u: string;
|
||||
i : integer;
|
||||
begin
|
||||
result:=FALSE;
|
||||
@ -1097,9 +1098,9 @@ procedure ThttpConn.processInputBuffer();
|
||||
if AnsiStartsText('Basic',s) then
|
||||
begin
|
||||
delete(s,1,6);
|
||||
s:=base64decode(s);
|
||||
request.user:=trim(chop(':',s));
|
||||
request.pwd:=s;
|
||||
u:=UTF8decode(base64decode(s));
|
||||
request.user:=trim(chop(':',u));
|
||||
request.pwd:=u;
|
||||
end;
|
||||
|
||||
s:=getHeader('Connection');
|
||||
|
||||
4
main.pas
4
main.pas
@ -6365,7 +6365,7 @@ type
|
||||
begin
|
||||
case encoding of
|
||||
E_PLAIN: result:=s;
|
||||
E_B64: result:=base64encode(s);
|
||||
E_B64: result:=b64utf8(s);
|
||||
E_ZIP:
|
||||
begin
|
||||
result:=zCompressStr(s, clMax);
|
||||
@ -6719,7 +6719,7 @@ var
|
||||
if p = 'login' then
|
||||
begin
|
||||
if not anycharIn(':', t) then
|
||||
t:=base64decode(t);
|
||||
t:=decodeB64utf8(t);
|
||||
a.user:=chop(':',t);
|
||||
a.pwd:=t;
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user