leafo / itchio-app-old

Desktop itch.io client
MIT License
45 stars 6 forks source link

App sends username & password as plain text #14

Closed MScottMcBee closed 9 years ago

MScottMcBee commented 9 years ago

Before this app is deployed, there really should be a proper login API call that accepts encrypted user info.

leafo commented 9 years ago

We can hit https for the api calls, but the openssl dependency is apparently annoying to set up on windows at the moment so it's disabled.

joseccandido commented 9 years ago

I managed to find a simpler way to use openssl on windows.

Install https://www.openssl.org/related/binaries.html

And change this on the .pro file.

From:

CONFIG += link_pkgconfig
PKGCONFIG += openssl

To:

CONFIG += link_pkgconfig
unix:PKGCONFIG += openssl
win32:LIBS += -LC:/OpenSSL-Win32/lib -lubsec
win32:INCLUDEPATH += C:/OpenSSL-Win32/include

That did the trick. Strange that this is a less featured solution. In most cases people advised to build Qt with openssl.

firas-assaad commented 9 years ago

A better way to set up OpenSSL on windows without hard-coding the OpenSSL-Win32 folder location (I have it on D, for example) is to write an openssl.pc file like:

prefix=C:/OpenSSL-Win32
exec_prefix=${prefix}/bin
libdir=${prefix}/lib
includedir=${prefix}/include
Name: OpenSSL
Description: OpenSSL
Version: 1.0.1j

Then add an environment variable PKG_CONFIG_PATH pointing to the folder where the file could be found. Once you've done you can simply use

CONFIG += link_pkgconfig
PKGCONFIG += openssl

In the .pro file.

joseccandido commented 9 years ago

Didn't work here.

firas-assaad commented 9 years ago

Could you try pkg-config --libs openssl in the command line? You can also try pkg-config --list-all, the pkg-config executable can be found in Qt/Tools/mingw/bin. You can also use the --debug flag to get more verbose information.

joseccandido commented 9 years ago

Qt didn't came with that exe for some reason. Followed a simple install guide and it worked: http://stackoverflow.com/a/22363820/4288184

Will patch it up. Thanks!

zachrburke commented 9 years ago

Found that on OSX I had to add the following line to the .pro file in order to build as well as locate the openssl package through Qt Creator:

QT_CONFIG -= no-pkg-config

Apparently, the mac version of Qt uses --no-pkg-config by default, as referenced here: http://stackoverflow.com/questions/16972066/using-pkg-config-with-qt-creator-qmake-on-mac-osx