From f681d4fd85ebf39acd2c06f8ac8185970fff2a13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arto=20Hyv=C3=A4ttinen?= Date: Fri, 13 Aug 2010 14:38:25 +0300 Subject: [PATCH] No password authentication - it does not work! --- src/urpoconnection.h | 4 ---- src/urpoconnectionsettings.cpp | 9 --------- src/urpoconnectionsettings.h | 3 --- src/urpomainwindow.cpp | 4 +--- src/urpoprocess.cpp | 26 -------------------------- src/urpoprocess.h | 6 ++---- 6 files changed, 3 insertions(+), 49 deletions(-) diff --git a/src/urpoconnection.h b/src/urpoconnection.h index 6035ec9..c647de7 100644 --- a/src/urpoconnection.h +++ b/src/urpoconnection.h @@ -94,10 +94,6 @@ public: */ QString getKeyOption(); - /*! Password or passphrase (UNSECURE!) - */ - virtual QString getPassword() const = 0; - private: /*! Receiver for debugMsg(QString&) signals */ QObject* debugMonitor_; diff --git a/src/urpoconnectionsettings.cpp b/src/urpoconnectionsettings.cpp index 3ca4d09..c7b1e3d 100644 --- a/src/urpoconnectionsettings.cpp +++ b/src/urpoconnectionsettings.cpp @@ -64,15 +64,6 @@ void UrpoConnectionSettings::setUserid(const QString &userid) password_ = QString(); } -QString UrpoConnectionSettings::getPassword() const -{ - return password_; -} - -void UrpoConnectionSettings::setPassword(QString &password) -{ - password_ = password; -} void UrpoConnectionSettings::store() const { diff --git a/src/urpoconnectionsettings.h b/src/urpoconnectionsettings.h index ab780dc..b7394a8 100644 --- a/src/urpoconnectionsettings.h +++ b/src/urpoconnectionsettings.h @@ -47,9 +47,6 @@ public: QString getIdentity() const; QString getUserid() const; - QString getPassword() const; - void setPassword(QString &password); - void setHost(const QString &host); void setIdentity(const QString &password); void setUserid(const QString &userid); diff --git a/src/urpomainwindow.cpp b/src/urpomainwindow.cpp index 40d23fb..6d3bbfe 100644 --- a/src/urpomainwindow.cpp +++ b/src/urpomainwindow.cpp @@ -41,7 +41,7 @@ #include "settingsdialog.h" -#define VERSION "0.9" /*! Program version */ +#define VERSION "0.92" /*! Program version */ UrpoMainWindow::UrpoMainWindow(QWidget *parent) : QMainWindow(parent) @@ -153,8 +153,6 @@ void UrpoMainWindow::initHelp() QString helpfilename = QString(":/help/index_") + language.left(2).toLower() + QString(".html"); - monitor_->debugMessage(helpfilename); - QFile helpfile( helpfilename ); if( helpfile.exists() ) helpBrowser_->setSource(QUrl( QString("qrc") + helpfilename )); diff --git a/src/urpoprocess.cpp b/src/urpoprocess.cpp index 7900617..a23ba2c 100644 --- a/src/urpoprocess.cpp +++ b/src/urpoprocess.cpp @@ -61,32 +61,6 @@ void UrpoProcess::timeout() { // If process is still running, it means timeout! if( status_ == Running) - { - // Read output - QByteArray bytes = qprocess_.readAllStandardOutput(); - QString string(bytes); - sendDebugMessage(string); - - if(string.contains("'s password:") || string.contains("passphrase:")) - { - // Try to ask password - if( storedPassword_.isEmpty()) - { - if( string.contains("'s password:") ) - storedPassword_ = QInputDialog::getText( 0, tr("Server ask password"), tr("Password:"), QLineEdit::PasswordEchoOnEdit ); - else - storedPassword_ = QInputDialog::getText( 0, tr("Server ask passphrase"), tr("Passphrase:"), QLineEdit::PasswordEchoOnEdit ); - } - qprocess_.write(storedPassword_.toAscii()); - qprocess_.write("\n"); - - QTimer::singleShot( getTimeout(), this, SLOT(timeout()) ); - status_ = PasswdRunning; - } - else - fail( Timeout ); - } - else if( status_ == PasswdRunning ) fail(Timeout); // FAILS !!! } diff --git a/src/urpoprocess.h b/src/urpoprocess.h index 1a0cf02..01a3831 100644 --- a/src/urpoprocess.h +++ b/src/urpoprocess.h @@ -87,8 +87,7 @@ public: Ready /*! Ready for connecting */ = 0, Running /*! Command running */ = 1, Successed /*! Command successed */ = 2, - Failed /*! Command failed */ = 3, - PasswdRunning /*! Running after password sent */ = 11 + Failed /*! Command failed */ = 3 }; enum UrpoError { @@ -193,7 +192,7 @@ protected: private: - static int const DEFAULTTIMEOUT = 15000; + static int const DEFAULTTIMEOUT = 20000; void fail(UrpoError error); @@ -204,7 +203,6 @@ private: UrpoStatus status_; UrpoError error_; int timeout_; /*! Timeout in msecs */ - QString storedPassword_; /* Password to store */ }; #endif // URPOPROCESS_H -- 1.7.9.5