3193: use sshkey gem to validate the ssh key passed in.
[arvados.git] / apps / workbench / app / views / users / _manage_ssh_keys.html.erb
index 580b5d89db95a8340cf3a24ef19c999332894099..e559356f72ea6c635c8961c4eb5492907223dbd0 100644 (file)
@@ -9,7 +9,7 @@
   <% end %>
 
   <% if @my_ssh_keys.andand.any? %>
-    <table class="table manage-ssh-keys-table" style="table-layout:fixed; overflow:hidden; white-space: nowrap;">
+    <table class="table manage-ssh-keys-table">
       <colgroup>
         <col style="width: 45%" />
         <col style="width: 45%" />
       <thead>
         <tr>
           <th> Name </th>
-          <th> Public Key </th>
+          <th> Key Finger Print </th>
           <th> </th>
         </tr>
       </thead>
       <tbody>
         <% @my_ssh_keys.andand.each do |key| %>
-          <tr>
-            <td style="width:50px; overflow:hidden;">
+          <tr style="word-break:break-all;">
+            <td>
               <%= key[:name] %>
             </td>
-            <td>
+            <td style="word-break:break-all;">
               <% if key[:public_key] && key[:public_key].size > 0 %>
                 <div>
-                  <pre style="margin:0; overflow-y:scroll; max-height:7em"><%= key[:public_key] %></pre>
+                  <%= SSHKey.fingerprint key[:public_key] %>
                 </div>
               <% else %>
                   <%= key[:public_key] %>