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.
1 parent bd5457e commit 61017e2Copy full SHA for 61017e2
crates/key-value-azure/src/store.rs
@@ -154,6 +154,15 @@ impl Store for AzureCosmosStore {
154
}
155
156
async fn set(&self, key: &str, value: &[u8]) -> Result<(), Error> {
157
+ let illegal_chars = ['/', '\\', '?', '#'];
158
+
159
+ if key.contains(|c| illegal_chars.contains(&c)) {
160
+ return Err(Error::Other(format!(
161
+ "Key contains an illegal character. Allowed characters do not include: {}",
162
+ illegal_chars.iter().collect::<String>()
163
+ )));
164
+ }
165
166
let pair = Pair {
167
id: key.to_string(),
168
value: value.to_vec(),
0 commit comments