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 2115699
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controllers/users_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ 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_ascii_whitespace()
.take(2)
.collect::<Vec<&str>>()
.join(" "),
)
}
}
}
Expand Down

0 comments on commit 2115699

Please sign in to comment.