User failure for documents with docid of ==512 bytes

This commit is contained in:
Louis Dureuil 2024-12-10 11:06:24 +01:00
parent 7cf6707ed3
commit e610af36aa
No known key found for this signature in database

View File

@ -280,7 +280,7 @@ fn starts_with(selector: &str, key: &str) -> bool {
pub fn validate_document_id_str(document_id: &str) -> Option<&str> {
if document_id.is_empty()
|| document_id.len() > 512
|| document_id.len() >= 512
|| !document_id.chars().all(|c| c.is_ascii_alphanumeric() || c == '-' || c == '_')
{
None