summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/transferserver.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp
index ed3e2c6..28b7b49 100644
--- a/core/launcher/transferserver.cpp
+++ b/core/launcher/transferserver.cpp
@@ -151,49 +151,51 @@ bool SyncAuthentication::checkPassword( const QString& password )
151 QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) ); 151 QString cpassword = QString::fromLocal8Bit( crypt( password.local8Bit(), cpwd.local8Bit() ) );
152 if ( cpwd == cpassword ) 152 if ( cpwd == cpassword )
153 return TRUE; 153 return TRUE;
154#endif 154#endif
155 155
156 static int lastdenial=0; 156 static int lastdenial=0;
157 static int denials=0; 157 static int denials=0;
158 int now = time(0); 158 int now = time(0);
159 159
160 // Detect old Qtopia Desktop (no password) 160 // Detect old Qtopia Desktop (no password)
161 if ( password.isEmpty() ) { 161 if ( password.isEmpty() ) {
162 if ( denials < 1 || now > lastdenial+600 ) { 162 if ( denials < 1 || now > lastdenial+600 ) {
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) == "Qtopia" ) { 175 if ( password.left(6) == "rootme" ) {
176 // fuckin TT gave us the wrong sync password.
177 // what a dumbassed password is rootme anyway.
176 QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) ); 178 QString cpassword = QString::fromLocal8Bit( crypt( password.mid(8).local8Bit(), "qp" ) );
177 Config cfg("Security"); 179 Config cfg("Security");
178 cfg.setGroup("Sync"); 180 cfg.setGroup("Sync");
179 QString pwds = cfg.readEntry("Passwords"); 181 QString pwds = cfg.readEntry("Passwords");
180 if ( QStringList::split(QChar(' '),pwds).contains(cpassword) ) 182 if ( QStringList::split(QChar(' '),pwds).contains(cpassword) )
181 return TRUE; 183 return TRUE;
182 184
183 // Unrecognized system. Be careful... 185 // Unrecognized system. Be careful...
184 186
185 if ( (denials > 2 && now < lastdenial+600) 187 if ( (denials > 2 && now < lastdenial+600)
186 || QMessageBox::warning(0,tr("Sync Connection"), 188 || QMessageBox::warning(0,tr("Sync Connection"),
187 tr("<p>An unrecognized system is requesting access to this device." 189 tr("<p>An unrecognized system is requesting access to this device."
188 "<p>If you have just initiated a Sync for the first time, this is normal."), 190 "<p>If you have just initiated a Sync for the first time, this is normal."),
189 tr("Allow"),tr("Deny"))==1 ) 191 tr("Allow"),tr("Deny"))==1 )
190 { 192 {
191 denials++; 193 denials++;
192 lastdenial=now; 194 lastdenial=now;
193 return FALSE; 195 return FALSE;
194 } else { 196 } else {
195 denials=0; 197 denials=0;
196 cfg.writeEntry("Passwords",pwds+" "+cpassword); 198 cfg.writeEntry("Passwords",pwds+" "+cpassword);
197 return TRUE; 199 return TRUE;
198 } 200 }
199 } 201 }