Skip to content

fix: validate soc address in pushsync and pullsync handlers - #5640

Merged
gacevicljubisa merged 3 commits into
masterfrom
fix/sync-soc-address-validation
Oct 3, 2026
Merged

gacevicljubisa merged 3 commits into
masterfrom
fix/sync-soc-address-validation

Conversation

@gacevicljubisa

@gacevicljubisa gacevicljubisa commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Adds the missing validation at the handlers and at the reserve.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@gacevicljubisa
gacevicljubisa force-pushed the fix/sync-soc-address-validation branch from 41d1c4a to 5e34757 Compare October 2, 2026 17:11
@gacevicljubisa
gacevicljubisa marked this pull request as ready for review October 2, 2026 17:26
Comment thread pkg/soc/validator.go Outdated
// FromValidChunk parses the chunk as a single-owner chunk and verifies that
// the chunk address is the address of the parsed SOC. Unlike FromChunk, it
// rejects a correctly signed SOC delivered under any other address.
func FromValidChunk(ch swarm.Chunk) (*SOC, error) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: FromChunkValidate(). FromValidChunk almost sounds like you assume the chunk is valid but you still don't know at this point

@gacevicljubisa
gacevicljubisa merged commit 8fb97f4 into master Oct 3, 2026
20 of 21 checks passed
@gacevicljubisa
gacevicljubisa deleted the fix/sync-soc-address-validation branch October 3, 2026 15:03
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.

3 participants