RUST-2354 Add option for max length when parsing cstrings#643
RUST-2354 Add option for max length when parsing cstrings#643isabelatkinson wants to merge 3 commits intomongodb:mainfrom
Conversation
kevinAlbs
left a comment
There was a problem hiding this comment.
Looks good with a suggestion to validate regex.
| /// encountered that exceeds the provided `len`. | ||
| #[cfg(feature = "sfp-internal")] | ||
| #[doc(hidden)] | ||
| pub fn get_with_max_cstr_parse_len( |
There was a problem hiding this comment.
(not needed for this PR since this is an internal API we can change if needed)
If we end up wanting to add any more control over parsing we might want to change this to get_with_options and make a proper options struct.
|
Going to give this a quick try in monguard tomorrow to confirm we're not missing any requirements, but the interface LGTM after a quick look. |
|
Sorry for the delay on this, I wasn't able to find time to try this out in monguard itself and have rotated off that team. Deferring to @jyemin 's review on this. FWIW, it looks fine to me for now, and whoever picks up https://jira.mongodb.org/browse/SERVER-120749 on the monguard side can surface any further requirements if necessary. |
|
@jyemin Can you please hit approve on this? Merging is blocked because you requested changes |
The maximum length can be configured on an iterator or through new getter methods:
The API additions are exposed behind an
sfp-internalfeature flag. The documentation for them is hidden. This will give us more semver flexibility to make breaking changes if needed. Docs for the new features can be generated locally by running: