mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Fix bug #340
This commit is contained in:
@@ -28,6 +28,9 @@ object SshUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def fingerPrint(key: String): String = KeyUtils.getFingerPrint(str2PublicKey(key).get)
|
def fingerPrint(key: String): Option[String] = str2PublicKey(key) match {
|
||||||
|
case Some(publicKey) => Some(KeyUtils.getFingerPrint(publicKey))
|
||||||
|
case None => None
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
@if(i != 0){
|
@if(i != 0){
|
||||||
<hr>
|
<hr>
|
||||||
}
|
}
|
||||||
<strong>@key.title</strong> (@_root_.ssh.SshUtil.fingerPrint(key.publicKey))
|
<strong>@key.title</strong> (@_root_.ssh.SshUtil.fingerPrint(key.publicKey).getOrElse("Key is invalid."))
|
||||||
<a href="@path/@account.userName/_ssh/delete/@key.sshKeyId" class="btn btn-mini btn-danger pull-right">Delete</a>
|
<a href="@path/@account.userName/_ssh/delete/@key.sshKeyId" class="btn btn-mini btn-danger pull-right">Delete</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user