Skip to content
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

audit-argument-checks and Global Exposure #370

Open
DDynamic opened this issue Jul 29, 2019 · 1 comment
Open

audit-argument-checks and Global Exposure #370

DDynamic opened this issue Jul 29, 2019 · 1 comment

Comments

@DDynamic
Copy link

Hello,
Thank you so much for this package! I am wondering if it is possibly to satisfy audit-argument-checks when using global exposure.

// server
Meteor.users.expose({
    firewall(filters, options, userId) {
      check(filters._id, String);
      check(options, Object);
      check(userId, String);
    }
  });

// client
const query = Meteor.users.createQuery({
      $filters: { _id: FlowRouter.getParam('_id') },
      memberId: 1,
      member: {
        membershipStarted: 1
      }
    });

    query.subscribe();
    return query.fetchOne();
  }

This is the error I am getting:

Exception from sub exposure_users id 7p... Error: Did not check() all arguments during publisher 'exposure_users'
I20190729-16:02:25.951(-5)?     at ArgumentChecker.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:515:13)
I20190729-16:02:25.951(-5)?     at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:122:16)
I20190729-16:02:25.952(-5)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:18)
I20190729-16:02:25.952(-5)?     at DDP._CurrentPublicationInvocation.withValue (packages/ddp-server/livedata_server.js:1046:15)
I20190729-16:02:25.952(-5)?     at Meteor.EnvironmentVariable.EVp.withValue (packages\meteor.js:1234:12)
I20190729-16:02:25.953(-5)?     at Subscription._runHandler (packages/ddp-server/livedata_server.js:1044:51)
I20190729-16:02:25.953(-5)?     at Session._startSubscription (packages/ddp-server/livedata_server.js:860:9)
I20190729-16:02:25.953(-5)?     at Session.sub (packages/ddp-server/livedata_server.js:625:12)
I20190729-16:02:25.954(-5)?     at packages/ddp-server/livedata_server.js:559:43
I20190729-16:02:25.990(-5)? Exception from sub exposure_users id e5... Error: Did not check() all arguments during publisher 'exposure_users'
I20190729-16:02:26.004(-5)?     at ArgumentChecker.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:515:13)
I20190729-16:02:26.004(-5)?     at Object._failIfArgumentsAreNotAllChecked (packages/check/match.js:122:16)
I20190729-16:02:26.004(-5)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1768:18)
I20190729-16:02:26.005(-5)?     at DDP._CurrentPublicationInvocation.withValue (packages/ddp-server/livedata_server.js:1046:15)
I20190729-16:02:26.005(-5)?     at Meteor.EnvironmentVariable.EVp.withValue (packages\meteor.js:1234:12)
I20190729-16:02:26.005(-5)?     at Subscription._runHandler (packages/ddp-server/livedata_server.js:1044:51)
I20190729-16:02:26.006(-5)?     at Session._startSubscription (packages/ddp-server/livedata_server.js:860:9)
I20190729-16:02:26.006(-5)?     at Session.sub (packages/ddp-server/livedata_server.js:625:12)

Please let me know if there is any more information or code samples I can provide. Thanks in advance for your help.

@LordA98
Copy link

LordA98 commented Jan 18, 2021

Hi @DDynamic,

Did you ever figure this out?

This closed post suggests audit-argument-checks package needs to be removed entirely - that it can be used with Grapher.

@theodorDiaconu, is it possible to use audit-argument-checks with Grapher? I'm also receiving the same error.

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

No branches or pull requests

2 participants