| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…verse Nested add mutations could mutate protected parent nodes through inverse edges without running the parent's update @auth rules. Track affected existing UIDs during mutation rewrite and authorize them after add-node checks, closing the false-accept bypass for hasInverse and deep nested inserts. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Core tests are failing and seem related to this change.
Sorry, something went wrong.
| @@ -0,0 +1,5 @@ | |||
| # Example override for projects using Dgraph standalone (e.g. raggen). | |||
There was a problem hiding this comment.
Please don't add fix-specific artifacts in your PR
Sorry, something went wrong.
| @@ -0,0 +1,99 @@ | |||
| # Nested Insert @auth Fix | |||
There was a problem hiding this comment.
Please don't add fix-specific artifacts in your PR
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes a false accept security gap in GraphQL add mutations: when a nested insert links to an existing parent via @hasInverse, Dgraph mutates the parent's inverse predicate but previously only ran @auth add checks on newly allocated UIDs. Protected parents were never validated, allowing unauthorized users to modify admin-only nodes indirectly.
Example bypass (now blocked):
…when ProtectedFoo requires admin for both add and update.
Related discussion: https://discuss.dgraph.io/t/bug-auth-rules-of-parent-not-respected-when-child-with-hasinverse-is-added/12955
Test plan
Made with Cursor