mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 13:03:04 +00:00
i2ptunnel: Fix double-b64 of default client name
Add new default client if all are revoked
This commit is contained in:
1 parent
16ac93c36b
commit
4d29bfefde
1 file changed
+6
-1
@@ -942,7 +942,7 @@ public class TunnelConfig {
|
||||
if (!_addClientAuth) {
|
||||
_addClientAuth = true;
|
||||
if (_newClientName == null || _newClientName.length() == 0)
|
||||
_newClientName = Base64.encode(DataHelper.getUTF8(GeneralHelper._t("Client", _context) + " 1"));
|
||||
_newClientName = GeneralHelper._t("Client", _context) + " 1";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -962,6 +962,11 @@ public class TunnelConfig {
|
||||
name = Base64.encode(DataHelper.getUTF8(GeneralHelper._t("Client", _context) + ' ' + (i + 1)));
|
||||
clientAuth.add(name + ':' + key);
|
||||
}
|
||||
if (clientAuth.isEmpty() && !_addClientAuth) {
|
||||
// if we revoked all of them, add a new one
|
||||
_addClientAuth = true;
|
||||
_newClientName = GeneralHelper._t("Client", _context) + " 1";
|
||||
}
|
||||
}
|
||||
if (_addClientAuth && _newClientName != null) {
|
||||
String name = _newClientName;
|
||||
|
||||
Reference in new issue
Block a user