From 0ce2de37e7b7af4fbcc34990f74f91476fb9e387 Mon Sep 17 00:00:00 2001 From: 4f77616973 <0x4f@tuta.io> Date: Thu, 12 Jan 2023 20:06:15 +0530 Subject: [PATCH 1/3] cleaned PR template --- .github/pull_request_template.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 6a93ddd..c711e5f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,23 +6,18 @@ *Describe the proposed solution and changes. How does it affect the project? How does it affect the internal structure (e.g., refactorings)?* -## 📷: Screenshots +## 📷 Screenshots *Provide screenshots showcasing the changes before and after the proposed changes (if applicable).* -## 📋 : Release Notes +## 📚 Release Notes *Provide a summary of the changes or features from a user's point of view. If there are breaking changes, provide migration guides using code examples of the affected features.* - - -## :heavy_plus_sign: Additional Information -*If applicable, provide additional context in this section.* - -### Testing +### 📝 Testing *Which tests were added? Which existing tests were adapted/changed? Which situations are covered, and what edge cases are missing?* -### Reviewer Nudging +### 👉 Reviewer Nudging *Where should the reviewer start? what is a good entry point?* From 772d91523809554d3232173cff99b6421373a605 Mon Sep 17 00:00:00 2001 From: 4f77616973 <0x4f@tuta.io> Date: Thu, 12 Jan 2023 20:07:34 +0530 Subject: [PATCH 2/3] cleaned PR template --- .github/pull_request_template.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c711e5f..017394b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,10 +14,7 @@ *Provide a summary of the changes or features from a user's point of view. If there are breaking changes, provide migration guides using code examples of the affected features.* -### 📝 Testing +## 📝 Testing *Which tests were added? Which existing tests were adapted/changed? Which situations are covered, and what edge cases are missing?* -### 👉 Reviewer Nudging - -*Where should the reviewer start? what is a good entry point?* From 6e75b2f46a56a62739de7b2ca6d01052b625c937 Mon Sep 17 00:00:00 2001 From: 4f77616973 <0x4f@tuta.io> Date: Tue, 17 Jan 2023 04:02:25 +0530 Subject: [PATCH 3/3] added totp size checker --- app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt b/app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt index 6e1dba2..1b32a80 100644 --- a/app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt +++ b/app/src/main/kotlin/cloud/keyspace/android/AddLogin.kt @@ -195,6 +195,11 @@ class AddLogin : AppCompatActivity() { } } + if (secretInput.text.toString().isNotBlank() && secretInput.text.toString().length < 6) { + secretInput.error = "Please enter a valid TOTP secret" + return@setOnClickListener + } + saveItem() } @@ -629,7 +634,7 @@ class AddLogin : AppCompatActivity() { override fun afterTextChanged (s: Editable) { } override fun beforeTextChanged (s: CharSequence, start: Int, count: Int, after: Int) { } override fun onTextChanged (s: CharSequence, start: Int, before: Int, count: Int) { - if (s.length >= 8) { + if (s.length >= 6) { try { otpCode = GoogleAuthenticator(base32secret = secretInput.text.toString()).generate() runOnUiThread { tokenPreview.text = otpCode!!.replace("...".toRegex(), "$0 ") }