Skip to content

fix(dao): reject nil free gas query requests#1053

Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:codex/dao-query-nil-requests-1014
Open

fix(dao): reject nil free gas query requests#1053
modelsbridgeaicom-ship-it wants to merge 1 commit into
openmetaearth:mainfrom
modelsbridgeaicom-ship-it:codex/dao-query-nil-requests-1014

Conversation

@modelsbridgeaicom-ship-it

Copy link
Copy Markdown
Contributor

Summary

Fixes #1014.

FreeGasAccounts and IsFreeGasAccount dereferenced nil gRPC request pointers. This adds explicit nil-request guards that return codes.InvalidArgument before either handler reads request fields or unwraps query state.

The regression calls both handlers with nil requests and verifies they return InvalidArgument instead of panicking.

Tests

Passed:

..\..\tools\go\bin\go.exe test .\x\dao\keeper -run TestFreeGasQueriesRejectNilRequests -count=1 -v
..\..\tools\go\bin\go.exe test .\x\dao\keeper -count=1
git diff --check

@koelzen koelzen added run-ci Trigger CI run and removed run-ci Trigger CI run labels Jun 10, 2026
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.

[Bug]: [Low] [DAO Query] FreeGasAccounts and IsFreeGasAccount panic on nil gRPC requests

2 participants