jberkel / sms-backup-plus

Backup Android SMS, MMS and call log to Gmail / Gcal / IMAP
https://play.google.com/store/apps/details?id=com.zegoggles.smssync
Apache License 2.0
1.79k stars 497 forks source link

IMAP password erased when saving settings a second time #1006

Closed Geekays closed 4 years ago

Geekays commented 4 years ago

Before you report your issue, please consider perusing the https://github.com/jberkel/sms-backup-plus#faq and searching the issues page to see if it has already been reported.

Expected behaviour

I joined the Beta program and using Beta version. The IMAP credentials section allows user to provide the username/password. Once added, the app is supposed to use the same.

Actual behaviour

The App does not store the password for using in the connection. Once user leaves the IMPA settings section, the password is nullified. So the app cannot connect without IMAP credentials.

Steps to reproduce the behaviour

Go to IMAP Setting, provide username and password. There is no save button, so use back button to come back to the main interface. Try running backup, Error shown: IMAP authorization error. Make sure login and password are set correctly."

Please specify the following:

Geekays commented 4 years ago

@jberkel is not looking this way!

jberkel commented 4 years ago

@Geekays how do you know the credentials are not saved? perhaps they are wrong?

Geekays commented 4 years ago

@Geekays how do you know the credentials are not saved? perhaps they are wrong?

When I reopen the option for the password, the field is blank. The value is retained till I come out of the IMAP settings page.

Also, I am sure that I won't be putting my credentials wrong everytime.

Geekays commented 4 years ago

I created another APP password and used device in place of App to generate the new password. It worked fine now.

Thanks @jberkel

nikkopt commented 4 years ago

I just noticed that this also happens with the non beta version. The password you put there is saved but the app will delete it if you open the password field again. Just input the password and don't re-open it, it will work fine with any kind of app password you create.

kurahaupo commented 4 years ago

Not showing the saved password is a correct security feature.

kurahaupo commented 4 years ago

@Geekays I've adjusted this ticket title to more closely describe the observed behaviour; please confirm that this is what you are seeing.

Question: from looking at the code, there appears to be an unconditional "save" when resuming the app; does this occur if you do or don't switch to another app while you have the "settings" open?

kurahaupo commented 4 years ago

(I may have mis-read that code; it sets a Listener rather than acting immediately.)

So the question is, does starting to edit the password, then erasing it, trigger this behaviour, or does it always erase the stored password when the display password is already blank?