Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@raphael
Copy link
Member

@raphael raphael commented Oct 16, 2025

Fix a bug where interceptor validation ignores attributes introduced via Extend on payload/result user types. Interceptors now correctly validate access to attributes merged from Bases.

Changes:

  • Update validateAttributeAccess to accept the target *AttributeExpr and use target.Find(name) so inherited attributes (Extend/References/UserType) are recognized.
  • Adjust all call sites to pass duplicated payload/result/streaming attributes.

Tests:

  • Add cases in expr/interceptor_test.go for payload/result/streaming payload when user types Extend base types providing the accessed attribute.
  • All new tests pass; they would fail prior to this change.

Compatibility:

  • No public API changes; internal method signature changed only.

Notes:

  • Validation runs pre-finalization; switching to Find ensures we traverse Bases and References consistently with other validations.
  • Lint and full test suite (including JSON-RPC integration tests) pass locally.

Fix a bug where interceptor validation ignores attributes introduced via Extend on payload/result user types. Interceptors now correctly validate access to attributes merged from Bases.

Changes:
- Update validateAttributeAccess to accept the target *AttributeExpr and use target.Find(name) so inherited attributes (Extend/References/UserType) are recognized.
- Adjust all call sites to pass duplicated payload/result/streaming attributes.

Tests:
- Add cases in expr/interceptor_test.go for payload/result/streaming payload when user types Extend base types providing the accessed attribute.
- All new tests pass; they would fail prior to this change.

Compatibility:
- No public API changes; internal method signature changed only.

Notes:
- Validation runs pre-finalization; switching to Find ensures we traverse Bases and References consistently with other validations.
- Lint and full test suite (including JSON-RPC integration tests) pass locally.
@raphael raphael enabled auto-merge (squash) October 16, 2025 23:52
@raphael raphael merged commit dd5df0e into v3 Oct 16, 2025
7 checks passed
@raphael raphael deleted the expr/interceptor-extend-validation branch October 16, 2025 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant