Skip to content

Commit

Permalink
hide hostname from public ssh keys
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Sep 29, 2024
1 parent 6dc57d3 commit 17135ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/users_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ pub async fn show_ssh_key<'r>(
for line in ssh_keys.lines() {
let line = line.trim();
if !line.is_empty() {
keys.push(line.to_string())
keys.push(
line.split(" ").take(2).collect::<Vec<&str>>().join(" "),
)
}
}
}
Expand Down

0 comments on commit 17135ae

Please sign in to comment.