Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nachocodoner
Copy link
Member

@nachocodoner nachocodoner commented Apr 10, 2024

Context: https://forums.meteor.com/t/meteor-3-0-beta-7-is-out/61417/27

Issue

Following #13063, we encountered an issue where audit-argument-checks didn't validate correctly. This problem remained hidden until the inclusion of the matb33:collection-hooks package, which brought it to light through the error message: Error: Did not check() all arguments during publisher.

The code snippet for reproduction is as follows:

if (Meteor.isServer) {
	Meteor.publish('namedPub', function (testValue, testStr) {
	    check(arguments, [Match.Any])
	    console.log('testStr', testStr);
	    return [];
	});
}

if (Meteor.isClient) {
	Meteor.subscribe('namedPub', 1, 'test');
}

Fix

Ensure proper validation of nullish values when preparing the context on EnvironmentVariableAsync code. audit-argument-checks used the 0 to hold its validation context.

Pending

  • Create a regression test that properly test audit-argument-checks similarly as the reproduction as it was not covered.

Copy link

netlify bot commented Apr 10, 2024

Deploy Preview for v3-meteor-api-docs canceled.

Name Link
🔨 Latest commit d0ea527
🔍 Latest deploy log https://app.netlify.com/sites/v3-meteor-api-docs/deploys/6617ddcc2dfd500008c7f934

@nachocodoner nachocodoner requested a review from denihs April 10, 2024 15:36
denihs
denihs previously approved these changes Apr 10, 2024
Copy link
Contributor

@Grubba27 Grubba27 left a comment

Choose a reason for hiding this comment

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

lgtm

@nachocodoner nachocodoner marked this pull request as ready for review April 11, 2024 14:28
@nachocodoner nachocodoner merged commit 398c9d0 into release-3.0 Apr 11, 2024
@nachocodoner nachocodoner deleted the fix-check-context branch April 11, 2024 14:29
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