mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +00:00
Android: Disable password strength meter
This commit is contained in:
parent
64ce0e62e2
commit
83efc3893b
4 changed files with 17 additions and 3 deletions
10
build.sh
10
build.sh
|
@ -24,14 +24,16 @@ elif [ "$BUILD_TYPE" == "release-static" ]; then
|
|||
BIN_PATH=release/bin
|
||||
elif [ "$BUILD_TYPE" == "release-android" ]; then
|
||||
echo "Building release for ANDROID"
|
||||
CONFIG="CONFIG+=release static WITH_SCANNER";
|
||||
CONFIG="CONFIG+=release static WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
||||
ANDROID=true
|
||||
BIN_PATH=release/bin
|
||||
DISABLE_PASS_STRENGTH_METER=true
|
||||
elif [ "$BUILD_TYPE" == "debug-android" ]; then
|
||||
echo "Building debug for ANDROID : ultra INSECURE !!"
|
||||
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER";
|
||||
CONFIG="CONFIG+=debug qml_debug WITH_SCANNER DISABLE_PASS_STRENGTH_METER";
|
||||
ANDROID=true
|
||||
BIN_PATH=debug/bin
|
||||
DISABLE_PASS_STRENGTH_METER=true
|
||||
elif [ "$BUILD_TYPE" == "debug" ]; then
|
||||
echo "Building debug"
|
||||
CONFIG="CONFIG+=debug"
|
||||
|
@ -57,7 +59,9 @@ fi
|
|||
./get_libwallet_api.sh $BUILD_TYPE
|
||||
|
||||
# build zxcvbn
|
||||
$MAKE -C src/zxcvbn-c || exit
|
||||
if [ "$DISABLE_PASS_STRENGTH_METER" != true ]; then
|
||||
$MAKE -C src/zxcvbn-c || exit
|
||||
fi
|
||||
|
||||
if [ ! -d build ]; then mkdir build; fi
|
||||
|
||||
|
|
|
@ -62,6 +62,12 @@ SOURCES += main.cpp \
|
|||
src/libwalletqt/UnsignedTransaction.cpp \
|
||||
MainApp.cpp
|
||||
|
||||
CONFIG(DISABLE_PASS_STRENGTH_METER) {
|
||||
HEADERS -= src/zxcvbn-c/zxcvbn.h
|
||||
SOURCES -= src/zxcvbn-c/zxcvbn.c
|
||||
DEFINES += "DISABLE_PASS_STRENGTH_METER"
|
||||
}
|
||||
|
||||
!ios {
|
||||
HEADERS += src/daemon/DaemonManager.h
|
||||
SOURCES += src/daemon/DaemonManager.cpp
|
||||
|
|
|
@ -304,6 +304,7 @@ QUrl WalletManager::localPathToUrl(const QString &path) const
|
|||
return QUrl::fromLocalFile(path);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_PASS_STRENGTH_METER
|
||||
double WalletManager::getPasswordStrength(const QString &password) const
|
||||
{
|
||||
static const char *local_dict[] = {
|
||||
|
@ -318,6 +319,7 @@ double WalletManager::getPasswordStrength(const QString &password) const
|
|||
ZxcvbnUnInit();
|
||||
return e;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool WalletManager::saveQrCode(const QString &code, const QString &path) const
|
||||
{
|
||||
|
|
|
@ -128,7 +128,9 @@ public:
|
|||
Q_INVOKABLE qint64 addi(qint64 x, qint64 y) const { return x + y; }
|
||||
Q_INVOKABLE qint64 subi(qint64 x, qint64 y) const { return x - y; }
|
||||
|
||||
#ifndef DISABLE_PASS_STRENGTH_METER
|
||||
Q_INVOKABLE double getPasswordStrength(const QString &password) const;
|
||||
#endif
|
||||
|
||||
Q_INVOKABLE QString resolveOpenAlias(const QString &address) const;
|
||||
Q_INVOKABLE bool parse_uri(const QString &uri, QString &address, QString &payment_id, uint64_t &amount, QString &tx_description, QString &recipient_name, QVector<QString> &unknown_parameters, QString &error);
|
||||
|
|
Loading…
Reference in a new issue