No password authentication - it does not work!
authorArto Hyvättinen <arto.hyvattinen@gmail.com>
Fri, 13 Aug 2010 11:38:25 +0000 (14:38 +0300)
committerArto Hyvättinen <arto.hyvattinen@gmail.com>
Fri, 13 Aug 2010 11:38:25 +0000 (14:38 +0300)
src/urpoconnection.h
src/urpoconnectionsettings.cpp
src/urpoconnectionsettings.h
src/urpomainwindow.cpp
src/urpoprocess.cpp
src/urpoprocess.h

index 6035ec9..c647de7 100644 (file)
@@ -94,10 +94,6 @@ public:
       */
     QString getKeyOption();
 
-    /*!  Password or passphrase (UNSECURE!)
-      */
-    virtual QString getPassword() const = 0;
-
 private:
     /*! Receiver for debugMsg(QString&) signals */
     QObject* debugMonitor_;
index 3ca4d09..c7b1e3d 100644 (file)
@@ -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
 {
index ab780dc..b7394a8 100644 (file)
@@ -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);
index 40d23fb..6d3bbfe 100644 (file)
@@ -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  ));
index 7900617..a23ba2c 100644 (file)
@@ -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 !!!
 }
 
index 1a0cf02..01a3831 100644 (file)
@@ -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