Skip to content

Skip calls to non-existent methods in _applyCalls()#265

Open
davidsf wants to merge 1 commit into
coldbox-modules:developmentfrom
davidsf:fix/applycalls-skip-nonexistent-method
Open

Skip calls to non-existent methods in _applyCalls()#265
davidsf wants to merge 1 commit into
coldbox-modules:developmentfrom
davidsf:fix/applycalls-skip-nonexistent-method

Conversation

@davidsf

@davidsf davidsf commented Jun 23, 2026

Copy link
Copy Markdown

Frontend calls to /cbwire/update could reference a method that no component defines. _applyCalls() invoked it unconditionally, so it fell through to onMissingMethod() and threw a CBWIREException, returning a 500.

Embedded browsers/WebViews and extensions sometimes serialize the $wire object and inject a call to the standard JS toJSON method (and similar noise). Guard the invoke with structKeyExists() so unknown methods are silently skipped instead of crashing the update request.

Frontend calls to /cbwire/update could reference a method that no
component defines. _applyCalls() invoked it unconditionally, so it fell
through to onMissingMethod() and threw a CBWIREException, returning a 500.

Embedded browsers/WebViews and extensions sometimes serialize the $wire
object and inject a call to the standard JS toJSON method (and similar
noise). Guard the invoke with structKeyExists() so unknown methods are
silently skipped instead of crashing the update request.
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