File tree Expand file tree Collapse file tree
owncloudApp/src/main/java/com/owncloud/android/presentation/security/biometric Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ ownCloud admins and users.
2727
2828## Summary
2929
30+ * Security - Improve biometric authentication security: [ #4180 ] ( https://github.com/owncloud/android/issues/4180 )
3031* Bugfix - Some Null Pointer Exceptions in MainFileListViewModel: [ #4065 ] ( https://github.com/owncloud/android/issues/4065 )
3132* Bugfix - Some Null Pointer Exceptions fixed from Google Play: [ #4207 ] ( https://github.com/owncloud/android/issues/4207 )
3233* Bugfix - Add "scope" parameter to /token endpoint HTTP requests: [ #4260 ] ( https://github.com/owncloud/android/pull/4260 )
@@ -51,6 +52,14 @@ ownCloud admins and users.
5152
5253## Details
5354
55+ * Security - Improve biometric authentication security: [ #4180 ] ( https://github.com/owncloud/android/issues/4180 )
56+
57+ Biometric authentication has been improved by checking the result received when
58+ performing a successful authentication.
59+
60+ https://github.com/owncloud/android/issues/4180
61+ https://github.com/owncloud/android/pull/4283
62+
5463* Bugfix - Some Null Pointer Exceptions in MainFileListViewModel: [ #4065 ] ( https://github.com/owncloud/android/issues/4065 )
5564
5665 The MainFileListViewModel has prevented the fileById variable from crashing when
Original file line number Diff line number Diff line change 1+ Security: Improve biometric authentication security
2+
3+ Biometric authentication has been improved by checking the result received when performing a successful
4+ authentication.
5+
6+ https://github.com/owncloud/android/issues/4180
7+ https://github.com/owncloud/android/pull/4283
Original file line number Diff line number Diff line change @@ -87,16 +87,20 @@ class BiometricActivity : AppCompatActivity() {
8787
8888 override fun onAuthenticationSucceeded (result : BiometricPrompt .AuthenticationResult ) {
8989 super .onAuthenticationSucceeded(result)
90- if (biometricViewModel.shouldAskForNewPassCode()) {
91- biometricViewModel.removePassCode()
92- val intent = Intent (baseContext, PassCodeActivity ::class .java)
93- intent.action = PassCodeActivity .ACTION_CREATE
94- intent.putExtra(PassCodeActivity .EXTRAS_MIGRATION , true )
95- startActivity(intent)
90+ if (result.cryptoObject?.cipher != cryptoObject.cipher) {
91+ authError()
92+ } else {
93+ if (biometricViewModel.shouldAskForNewPassCode()) {
94+ biometricViewModel.removePassCode()
95+ val intent = Intent (baseContext, PassCodeActivity ::class .java)
96+ intent.action = PassCodeActivity .ACTION_CREATE
97+ intent.putExtra(PassCodeActivity .EXTRAS_MIGRATION , true )
98+ startActivity(intent)
99+ }
100+ biometricViewModel.setLastUnlockTimestamp()
101+ OwnCloudBiometricManager .onActivityStopped(this @BiometricActivity)
102+ finish()
96103 }
97- biometricViewModel.setLastUnlockTimestamp()
98- OwnCloudBiometricManager .onActivityStopped(this @BiometricActivity)
99- finish()
100104 }
101105
102106 override fun onAuthenticationFailed () {
You can’t perform that action at this time.
0 commit comments