We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 95428dd + ca453e9 commit 68ad236Copy full SHA for 68ad236
packages/utils/src/padding.rs
@@ -30,10 +30,13 @@ where
30
data
31
});
32
for attribute in &mut response.attributes {
33
- // Safety: These two are safe because we know the characters that
34
- // `space_pad` appends are valid UTF-8
35
- unsafe { space_pad(attribute.key.as_mut_vec(), block_size) };
36
- unsafe { space_pad(attribute.value.as_mut_vec(), block_size) };
+ // do not pad plaintext attributes
+ if attribute.encrypted {
+ // Safety: These two are safe because we know the characters that
+ // `space_pad` appends are valid UTF-8
37
+ unsafe { space_pad(attribute.key.as_mut_vec(), block_size) };
38
+ unsafe { space_pad(attribute.value.as_mut_vec(), block_size) };
39
+ }
40
}
41
response
42
})
0 commit comments