diff options
Diffstat (limited to 'src/api/users.rs')
| -rw-r--r-- | src/api/users.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/users.rs b/src/api/users.rs index d6950af..fc3f6dc 100644 --- a/src/api/users.rs +++ b/src/api/users.rs @@ -171,8 +171,8 @@ pub(crate) async fn put_own_key( Path(id): Path<String>, body: String, ) -> Result<StatusCode, ApiError> { - let key = crate::access::sshsig::PublicKey::parse(body.trim()).map_err(|why| bad(&why))?; - own_key(&state, &user.0, id, Some(key.line()), false).await + let line = crate::access::sshsig::PublicKey::kept_line(body.trim()).map_err(|why| bad(&why))?; + own_key(&state, &user.0, id, Some(line), false).await } /// `DELETE /auth/keys/{id}`. |
