https://bugs.winehq.org/show_bug.cgi?id=40169
Bug ID: 40169 Summary: Recognize INTERNET_FLAG_SECURE with INTERNET_INVALID_PORT_NUMBER in GetHttpConnection Product: Wine Version: 1.9.3 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wininet Assignee: wine-bugs@winehq.org Reporter: PhoneixSegovia@gmail.com Distribution: ---
When using GetHttpConnection with the port INTERNET_INVALID_PORT_NUMBER and the flag INTERNET_FLAG_SECURE wininet interpret incorrectly and try to connect to port 80.
For example this is the code used in the windows program to make a request:
#include "afxinet.h"
BOOL servicioPost(const char* actionPage, CString& strFormData, CString& mensajeError, CString& contenidoFichero){ CString strHeaders = _T("Content-Type: application/x-www-form-urlencoded"); CHttpConnection* pConnection = NULL; CHttpFile* pFile = NULL; BOOL retorno = FALSE; TRY{ CInternetSession session; pConnection = session.GetHttpConnection(DOMINIO_SERVIDOR, INTERNET_FLAG_SECURE,INTERNET_INVALID_PORT_NUMBER, NULL, NULL); if (pConnection){ pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST, actionPage, NULL, 1, NULL, NULL, INTERNET_FLAG_SECURE); if (pFile){ if (pFile->SendRequest(strHeaders, (LPVOID)(LPCTSTR)strFormData, strFormData.GetLength())){ retorno = TRUE; // Make another stuff } } } } CATCH_ALL(e){ char mensaje[100]; e->GetErrorMessage(mensaje, 100); mensajeError = "Error Wininet: "; mensajeError += mensaje; } END_CATCH_ALL
if (pConnection)delete pConnection;//don't skip if (pFile)delete pFile;//don't skip
return retorno; }
https://bugs.winehq.org/show_bug.cgi?id=40169
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/wininet-HttpOp | |enRequestW Status|UNCONFIRMED |STAGED Ever confirmed|0 |1
https://bugs.winehq.org/show_bug.cgi?id=40169
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dimesio@earthlink.net, | |winetest@luukku.com
--- Comment #1 from winetest@luukku.com --- I think patches
https://source.winehq.org/patches/data/128553 https://source.winehq.org/patches/data/128554
and commits
http://source.winehq.org/git/wine.git/commit/0d22e43f8c12fb6df92af2e05ac35cb...
http://source.winehq.org/git/wine.git/commit/725b55ded212c48670e9991cd76cbb8...
Fixed this in wine 2.0rc2.
If they did the commits and the staging patch should be the same.
https://bugs.winehq.org/show_bug.cgi?id=40169
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=40169
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeffz@jeffz.name
https://bugs.winehq.org/show_bug.cgi?id=40169
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0d22e43f8c12fb6df92af2e05ac | |35cbdf1c3fe3f Resolution|--- |FIXED Status|STAGED |RESOLVED
--- Comment #2 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to winetest from comment #1)
I think patches
https://source.winehq.org/patches/data/128553 https://source.winehq.org/patches/data/128554
and commits
http://source.winehq.org/git/wine.git/commit/ 0d22e43f8c12fb6df92af2e05ac35cbdf1c3fe3f
http://source.winehq.org/git/wine.git/commit/ 725b55ded212c48670e9991cd76cbb85470262fd
Fixed this in wine 2.0rc2.
If they did the commits and the staging patch should be the same.
Yes, thanks.
https://bugs.winehq.org/show_bug.cgi?id=40169
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.0-rc4.