summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-06 20:55:41 (UTC)
committer zecke <zecke>2002-09-06 20:55:41 (UTC)
commit15992c5f9b24eaf8df6f90d1993c85d73827b98f (patch) (unidiff)
treefdcf85ca5ac482c87b7d8822069d3be3833f3e05
parentc9f7e21a3897b4a02c6eb460286eacbfafbba06f (diff)
downloadopie-15992c5f9b24eaf8df6f90d1993c85d73827b98f.zip
opie-15992c5f9b24eaf8df6f90d1993c85d73827b98f.tar.gz
opie-15992c5f9b24eaf8df6f90d1993c85d73827b98f.tar.bz2
Backward and forward compability...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index 28b7b49..9d18b7b 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -163,27 +163,33 @@ bool SyncAuthentication::checkPassword( const QString& password )
163 QMessageBox::warning( 0,tr("Sync Connection"), 163 QMessageBox::warning( 0,tr("Sync Connection"),
164 tr("<p>An unauthorized system is requesting access to this device." 164 tr("<p>An unauthorized system is requesting access to this device."
165 "<p>If you are using a version of Qtopia Desktop older than 1.5.1, " 165 "<p>If you are using a version of Qtopia Desktop older than 1.5.1, "
166 "please upgrade."), 166 "please upgrade."),
167 tr("Deny") ); 167 tr("Deny") );
168 denials++; 168 denials++;
169 lastdenial=now; 169 lastdenial=now;
170 } 170 }
171 return FALSE; 171 return FALSE;
172 } 172 }
173 173
174 // Second, check sync password... 174 // Second, check sync password...
175 if ( password.left(6) == "rootme" ) { 175 QString pass = password.left(6);
176 // fuckin TT gave us the wrong sync password. 176 /* old QtopiaDesktops are sending
177 // what a dumbassed password is rootme anyway. 177 * rootme newer versions got a Qtopia
178 * prefixed. Qtopia prefix will suceed
179 * until the sync software syncs up
180 * FIXME
181 */
182 if ( pass == "rootme" || pass == "Qtopia") {
183
178 QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) ); 184 QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) );
179 Config cfg("Security"); 185 Config cfg("Security");
180 cfg.setGroup("Sync"); 186 cfg.setGroup("Sync");
181 QString pwds = cfg.readEntry("Passwords"); 187 QString pwds = cfg.readEntry("Passwords");
182 if ( QStringList::split(QChar(' '),pwds).contains(cpassword) ) 188 if ( QStringList::split(QChar(' '),pwds).contains(cpassword) )
183 return TRUE; 189 return TRUE;
184 190
185 // Unrecognized system. Be careful... 191 // Unrecognized system. Be careful...
186 192
187 if ( (denials > 2 && now < lastdenial+600) 193 if ( (denials > 2 && now < lastdenial+600)
188 || QMessageBox::warning(0,tr("Sync Connection"), 194 || QMessageBox::warning(0,tr("Sync Connection"),
189 tr("<p>An unrecognized system is requesting access to this device." 195 tr("<p>An unrecognized system is requesting access to this device."