#1 Re: mORMot 1 » Some more THttpAPIServer » 2020-06-17 09:25:27

For context, this is one of my teammate, working on the same project as me wink

#2 Re: mORMot 1 » THttpApiServer, HTTP_REQUEST: Issue with Windows Auth and 64 bits » 2020-06-11 08:27:27

@ab
The new struct works for 64 bits but no longer work for 32 bits sad
The value of RequestInfoCount is offset and set into pRequestInfo

#3 Re: mORMot 1 » THttpApiServer, HTTP_REQUEST: Issue with Windows Auth and 64 bits » 2020-06-11 08:14:30

@mpv
I'm only using THttpApiServer so it's pratical for me that http.sys is handling all the back and forth regarding the Windows Auth and make it very simple to implement on my side.

However, we have another issue with it (all request are auth as the first user who logged in, kernel side) so I'll have a look at SynSSPIAuth and see it the issue persist.

@ab
On my way to test the new struct

#4 Re: mORMot 1 » THttpApiServer, HTTP_REQUEST: Issue with Windows Auth and 64 bits » 2020-06-10 14:58:03

I'll give it a try, but I'm wondering:
- Won't this remove the padding when using 32 bits ?
- Since 32 bits was working with the padding, will it still work ?

#5 Re: mORMot 1 » RemoteIP in request context - dissapear? » 2020-06-10 12:55:29

Hi,


A related issue I've just found, in procedure "THttpApiServer.Execute" (SynCrtSock.pas):

The "RemoteIP" header is properly set, however "Context.fRemoteIP" is never set.


Regards,

#6 mORMot 1 » THttpApiServer, HTTP_REQUEST: Issue with Windows Auth and 64 bits » 2020-06-10 10:11:45

HgAlexx
Replies: 7

Hello,

I found an issue with Windows authentication when using THttpApiServer and Kerberos (Negotiate), and if mORMot (SynCrtSock.pas) is compiled for 64 bits.

When testing on 32 bits, after an authentication attempt, the field "RequestInfoCount" of structure "HTTP_REQUEST" contains a value > 0

But when testing on 64 bits, "RequestInfoCount" is equal to 0 and the correct value is found inside the field "xxxPadding" of structure "HTTP_REQUEST", which is directly before "RequestInfoCount".


I've "fixed" the issue by adding an IFNDEF arround "xxxPadding" like that:

    // beginning of HTTP_REQUEST_V2 structure
    {$IFNDEF CPU64}
    xxxPadding: DWORD;
    {$ENDIF}
    RequestInfoCount: word;

However, C to Delphi structure conversion and fields size/alignment is not my area of expertise and I not sure at all that this is the proper fix.


Please advise.



Regards,

Alex.

Board footer

Powered by FluxBB