jdaugherty commented on PR #16631: URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6416875465
@jamesfredley, I pushed 28b2772301 over da16a91754, still a single commit on 9.0.x. It closes two more gaps in the MongoDB redaction: - **`$const`:** MongoDB accepts `$const` in place of `$literal`, but its operand was read as an expression, so a `$`-prefixed key inside it was kept as an operator. Its operand is now literal data, as with `$literal`. - **DBRefs:** a DBRef was recognized only when `$ref` came first. MongoDB reads `$ref`, `$id` and `$db` as fields in any order and compares their values whole. That applies to the value of a field, at the top of a condition or of an `$or`/`$and` element, and in an `$elemMatch`. The redactor now does the same, so no key inside a reference's id is recorded. `MongoCommandRedactorSpec` has exact-output rows and a leak check for each of those positions. `QueryTailCommandListenerSpec` runs the `$const` projection and each DBRef shape against MongoDB. It checks that the server still matches the stored reference and that the capture holds none of its keys. The full `:grails-data-mongodb-core` suite and its code style checks pass locally. The guide's MongoDB paragraph describes both cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
