From 11dd5a0ae73b4d3612de6422893a25232f930b84 Mon Sep 17 00:00:00 2001 From: Levente Kurusa Date: Mon, 5 Jun 2023 14:52:02 +0200 Subject: fix(ext/crypto): fix JWK import of Ed25519 (#19279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #18049 --------- Co-authored-by: Bartek IwaƄczuk --- ext/crypto/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/crypto/lib.rs') diff --git a/ext/crypto/lib.rs b/ext/crypto/lib.rs index 05349bf68..dc5faf5e7 100644 --- a/ext/crypto/lib.rs +++ b/ext/crypto/lib.rs @@ -116,10 +116,11 @@ deno_core::extension!(deno_crypto, ); #[op] -pub fn op_crypto_base64url_decode(data: String) -> ZeroCopyBuf { - let data: Vec = - base64::decode_config(data, base64::URL_SAFE_NO_PAD).unwrap(); - data.into() +pub fn op_crypto_base64url_decode( + data: String, +) -> Result { + let data: Vec = base64::decode_config(data, base64::URL_SAFE_NO_PAD)?; + Ok(data.into()) } #[op] -- cgit v1.2.3