Skip to content

feat(core): implement hardening and listener resilience - #4

Merged
protheeuz merged 1 commit into
mainfrom
feat/core-hardening
Apr 29, 2026
Merged

feat(core): implement hardening and listener resilience#4
protheeuz merged 1 commit into
mainfrom
feat/core-hardening

Conversation

@suckserberg

Copy link
Copy Markdown
Collaborator

Pull Request: Core Hardening and Listener Resilience

Summary

This PR implements critical security hardening and resilience features for the Satset networking engine. It protects the library from malicious client data and ensures that internal script errors in user listeners do not halt the entire networking system.

Technical Implementation

  • Listener Protection: Replaced pcall with xpcall in Packet._dispatchSingle and Channel._applyUpdate. This provides error isolation, ensuring that one failing callback doesn't break other listeners.
  • Initialization Guard: Added a flag to Satset.start() to prevent multiple initialization calls, which previously caused duplicate event listener stacking.
  • Bounds Checking: Implemented strict validation for variable-length types (string8, string16, array, map) in src/Types/init.luau. It now verifies wire-provided length prefixes against the actual buffer size to prevent VM crashes or out-of-bounds reads.

Changelog Entry

  • [Core]: Implementation of listener isolation and buffer bounds checking. Enhances library stability and prevents server crashes from malformed data.

Type of Change

  • Feature
  • Bug Fix
  • Performance Optimization
  • Documentation Update
  • Maintenance / Chore

Verification and Standards

  • I have adhered to the Development Patterns.
  • I have verified that all CI/CD linting and formatting checks pass.
  • I have confirmed the changes within a Rojo-supported environment.
  • I have updated the technical documentation for any API or architectural changes.

@suckserberg
suckserberg requested a review from protheeuz as a code owner April 29, 2026 22:25
@github-actions github-actions Bot added the enhancement New feature or request label Apr 29, 2026

@protheeuz protheeuz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Nice 💯

@protheeuz
protheeuz self-requested a review April 29, 2026 22:45
@protheeuz
protheeuz merged commit 889fc96 into main Apr 29, 2026
5 checks passed
@protheeuz
protheeuz deleted the feat/core-hardening branch April 30, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants