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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user