Fix EDU-639 Don't save empty string as a password
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Wed, 22 Jun 2016 15:42:46 +0000 (18:42 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Wed, 22 Jun 2016 16:49:14 +0000 (19:49 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/stepic/StepicUser.java

index 135181cd886236ec110e67dd20ad6540daf3921b..16a57fa7f283b54cacd78bb462824b7d1f98a0f8 100644 (file)
@@ -79,6 +79,7 @@ public class StepicUser {
 
   @Transient
   public void setPassword(@NotNull final String password) {
+    if (password.isEmpty()) return;
     try {
       PasswordSafe.getInstance().storePassword(null, StudyTaskManager.class, STEPIC_SETTINGS_PASSWORD_KEY + getEmail(), password);
     }