Skip to content

fix(pass-style): better byteArray support #2843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

erights
Copy link
Contributor

@erights erights commented Jun 4, 2025

Closes: #XXXX
Refs: #2248

Description

While working on #2248, I ran into previously undetected bugs due to confusion between 'bytes' and 'byteArray' as the name for passable Immutable ArrayBuffers. This PR is extracted from the portions of #2248 in which I fix this and test the fix.

Security & Scaling Considerations

The bug manifested in trying to test the pattern-based limits enforcement for byteArrays. The inability to enforce those limits create both security and scaling hazards. This PR fixes those hazards.

Documentation Considerations

M.bytes() should no longer appear in any docs. Use M.byteArray() instead.

Testing Considerations

Had previous PRs tested the limits enforcement, this bug would have been found and fixed earlier. Mea culpa. This PR does add those tests.

Compatibility Considerations

If there was previous code using M.bytes(), or storing the matcher object it produces, then we'd have a compat problem. As long as we merge this PR before the next big agoric-sdk sync, we should avoid any such compat problem. Hence, I'm labeling this as "image".

Upgrade Considerations

As long as nothing previously used M.bytes() or stored the matcher it creates, none.

@erights erights self-assigned this Jun 4, 2025
@erights erights force-pushed the markm-better-byteArrays branch from 3a27a07 to 44953f9 Compare June 4, 2025 23:14
@erights erights marked this pull request as ready for review June 4, 2025 23:26
@erights erights requested review from kriskowal, kumavis and leotm June 4, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant