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

fix: prevent false positive return for guarding dao member store #3121

Closed
wants to merge 1 commit into from

Conversation

piux2
Copy link
Contributor

@piux2 piux2 commented Nov 14, 2024

If we want to guard the MemStore by checking the active DAO realm, m.daoPkgPath must first be assigned a realm package path; otherwise, the isCallerDAORealm() method may return a false positive, failing to protect the MemStore.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

If we want to guard the MemStore by checking the active DAO realm, m.daoPkgPath must first be assigned a realm package path; otherwise, the isCallerDAORealm() method may return a false positive, failing to protect the MemStore.
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.78%. Comparing base (bd1d76e) to head (52dd472).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3121      +/-   ##
==========================================
- Coverage   63.79%   63.78%   -0.01%     
==========================================
  Files         549      549              
  Lines       78819    78819              
==========================================
- Hits        50279    50276       -3     
- Misses      25150    25152       +2     
- Partials     3390     3391       +1     
Flag Coverage Δ
contribs/gnodev 61.16% <ø> (ø)
contribs/gnofaucet 14.82% <ø> (ø)
gno.land 73.70% <ø> (ø)
gnovm 67.93% <ø> (ø)
misc/genstd 79.72% <ø> (ø)
tm2 62.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Kouteki
Copy link
Contributor

Kouteki commented Nov 17, 2024

Closing the issue: Manfred & Miloš discussed this and agreed that, if daoPkgPath isn't defined, realm guard should not be active.

@Kouteki Kouteki closed this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants