[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [orbot/master] closes #424
commit 3ea17c5befae9b4fb72fc602e908308633b936b2
Author: bim <dsnake@xxxxxxxxxxxxxx>
Date: Thu Jan 28 11:44:56 2021 -0500
closes #424
---
.../torproject/android/ui/hiddenservices/backup/BackupUtils.java | 6 ++----
.../android/ui/hiddenservices/dialogs/AddCookieDialog.java | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/backup/BackupUtils.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/backup/BackupUtils.java
index e67a8113..a10dd7ff 100644
--- a/app/src/main/java/org/torproject/android/ui/hiddenservices/backup/BackupUtils.java
+++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/backup/BackupUtils.java
@@ -47,10 +47,8 @@ public class BackupUtils {
return zipFile.getPath();
}
- // returns true if domain is v2 onion address or v3 onion address
- public static boolean isOnionAddressValid(String onionToTest) {
- if (onionToTest.matches("([a-z0-9]{16}).onion")) return true;
- return onionToTest.matches("([a-z0-9]{56}).onion");
+ public static boolean isV2OnionAddressValid(String onionToTest) {
+ return onionToTest.matches("([a-z0-9]{16}).onion");
}
private String[] createFilesForZipping(int port) {
diff --git a/app/src/main/java/org/torproject/android/ui/hiddenservices/dialogs/AddCookieDialog.java b/app/src/main/java/org/torproject/android/ui/hiddenservices/dialogs/AddCookieDialog.java
index b00c29db..a0e584c4 100644
--- a/app/src/main/java/org/torproject/android/ui/hiddenservices/dialogs/AddCookieDialog.java
+++ b/app/src/main/java/org/torproject/android/ui/hiddenservices/dialogs/AddCookieDialog.java
@@ -76,7 +76,7 @@ public class AddCookieDialog extends DialogFragment {
String onion = etOnion.getText().toString();
String cookie = etCookie.getText().toString();
if (TextUtils.isEmpty(onion.trim()) || TextUtils.isEmpty(cookie.trim())) return false;
- return BackupUtils.isOnionAddressValid(onion);
+ return BackupUtils.isV2OnionAddressValid(onion);
}
private void saveData(String domain, String cookie) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits