[Bug 26382] New: Login fails, cookies?

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Mar 11 01:51:04 CST 2011


http://bugs.winehq.org/show_bug.cgi?id=26382

           Summary: Login fails, cookies?
           Product: Wine
           Version: 1.3.15
          Platform: x86
               URL: http://http://netikka.net/dev/logintest.exe
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: ocean04 at suomi24.fi


Example: http://netikka.net/dev/logintest.exe

Click button -> After waiting it should say: "Login ok!" 

But it fails and then crash: http://aijaa.com/v.php?i=000127663221.jpg

Source: 

procedure TForm1.Button1Click(Sender: TObject);
var
  strPostData: string;
  Data: Pointer;
  URL, Flags, TargetFrameName, PostData, Headers, docs: OleVariant;
  Startedtime, timeout: DWORD;
  Doc3: IHTMLDocument3;
begin
 strPostData := 'username=testaaja&fpassword=liekki';
 // account is anonymous, just created it for this
 PostData :=  VarArrayCreate([0, Length(strPostData) - 1], varByte);
 Data := VarArrayLock(PostData);
 try
   Move(strPostData[1], Data^, Length(strPostData));
 finally
   VarArrayUnlock(PostData);
 end;
 URL := 'http://www.aijaa.com/login.php?act=login';
 Flags := EmptyParam;
 TargetFrameName := EmptyParam;
 Headers := 'Referer: http://www.aijaa.com/login.php'+#10#13+'Content-Type:
application/x-www-form-urlencoded'+ #10#13#0;
 StartedTime := GetTickCount;
 timeout:=30000;
 webbrowser1.Navigate2(URL, Flags, TargetFrameName, PostData, Headers);
 while ((webbrowser1.Busy) or (webbrowser1.readystate <> 4)) and
(gettickcount<startedtime+timeout) do
  application.processmessages;
 if (gettickcount>=startedtime+timeout) then begin edit1.text:='Timeout!';
exit; end;
 StartedTime := GetTickCount;

 // After login load main page..

 webbrowser1.Navigate('http://www.aijaa.com');
 while ((webbrowser1.Busy) or (webbrowser1.ReadyState <> 4)) and
(gettickcount<startedtime+timeout) do
  application.processmessages;
 if (gettickcount>=startedtime+timeout) then begin edit1.Text:='Login
failed!!'; end;

 // Check if login still ok?

 if Supports(webbrowser1.Document, IHTMLDocument3, Doc3) then
  if assigned(Doc3.getElementByID('fID')) then
  begin
   edit1.Text:='Login ok!';
  end else edit1.Text:='Login failed!!';
end;

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list