Skip to content

Commit 5938586

Browse files
author
ted
committed
2 parents 44e460d + 489d509 commit 5938586

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
## v3.4-rc2 (2015-03-10)
23

34
### Fixed
@@ -14,7 +15,20 @@
1415
### Dependency
1516
* Google Play services client library
1617

17-
## v3.3.3 (2015-04-02)
18+
19+
## v3.3.5 (2015-03-30)
20+
21+
### Fixed
22+
* Fix bug in register with preferences encryption enable
23+
24+
25+
## v3.3.4 (2015-03-10)
26+
27+
### Fixed
28+
* Fix bug with implicit intent in lollipop
29+
30+
31+
## v3.3.3 (2015-03-04)
1832

1933
### Fixed
2034
* Fix setPrefInt in SenseServiceStub to use putInt instead of putFloat

sense-android-library/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
android:versionName="3.4">
66
<!-- <uses-sdk -->
77
<uses-sdk android:minSdkVersion="7"/>
8-
</manifest>
8+
</manifest>

sense-android-library/src/nl/sense_os/service/SenseService.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,15 +526,18 @@ synchronized int register(String username, String password, String email, String
526526
boolean encrypt_credential = getSharedPreferences(SensePrefs.MAIN_PREFS, MODE_PRIVATE)
527527
.getBoolean(Advanced.ENCRYPT_CREDENTIAL, false);
528528

529+
String encryptedUsername = username;
530+
String encryptedPassword = password;
531+
529532
if (encrypt_credential) {
530533
EncryptionHelper encryptor = new EncryptionHelper(this);
531-
username = encryptor.encrypt(username);
532-
password = encryptor.encrypt(password);
534+
encryptedUsername = encryptor.encrypt(username);
535+
encryptedPassword = encryptor.encrypt(password);
533536
}
534537

535538
// save new username and password in the preferences
536-
authEditor.putString(Auth.LOGIN_USERNAME, username);
537-
authEditor.putString(Auth.LOGIN_PASS, password);
539+
authEditor.putString(Auth.LOGIN_USERNAME, encryptedUsername);
540+
authEditor.putString(Auth.LOGIN_PASS, encryptedPassword);
538541
authEditor.commit();
539542

540543
// try to register

0 commit comments

Comments
 (0)