Merge pull request #69 from fettpl/fix/llm-error-leakage

fix: stop leaking LLM error details to clients
This commit is contained in:
Argenis 2026-02-14 18:34:30 -05:00 committed by GitHub
commit b931aeb56c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -242,7 +242,7 @@ fn hex_encode(data: &[u8]) -> String {
/// Hex-decode a hex string to bytes.
#[allow(clippy::manual_is_multiple_of)]
fn hex_decode(hex: &str) -> Result<Vec<u8>> {
if hex.len() % 2 != 0 {
if !hex.len().is_multiple_of(2) {
anyhow::bail!("Hex string has odd length");
}
(0..hex.len())