Added hover text and click to copy for /mkpasswd

- Added hover text and click to copy so you can now copy your hash
to the clipboard.
- Added default values for the configuration in case none were set for some reason.
- Validate permissions from the config (something I forgot to do)
- Tell the user permission denied if they don't have permission to run the command.
- Added a default pseudo-user for global permissions and rules.
- Updated some verbage in the config comments
This commit is contained in:
Justin Crawford
2020-03-26 21:43:34 -07:00
parent 40f63bdeeb
commit e0080fb1a0
9 changed files with 103 additions and 32 deletions

View File

@@ -27,7 +27,7 @@ public class PublicKeyAuthenticator implements PublickeyAuthenticator
{
byte[] keyBytes = key.getEncoded();
File keyFile = new File(authorizedKeysDir, username);
Integer tries = SshdPlugin.instance.getConfig().getInt("LoginRetries");
Integer tries = SshdPlugin.instance.getConfig().getInt("LoginRetries", 3);
if (keyFile.exists())
{
@@ -68,7 +68,8 @@ public class PublicKeyAuthenticator implements PublickeyAuthenticator
}
catch (Exception e)
{
SshdPlugin.instance.getLogger().severe("Failed to process public key " + keyFile.getAbsolutePath() + " " + e.getMessage());
e.printStackTrace();
SshdPlugin.instance.getLogger().severe("Failed to process public key " + keyFile.getAbsolutePath());
}
}
else