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] 14. “Migrate only if newer” pattern is not followed #869

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

NoahSaso
Copy link
Member

@NoahSaso NoahSaso commented Aug 2, 2024

From Oak:

In contracts/distribution/dao-rewards-distributor/src/contract.rs:594 -597, the rewards distributor contract can be migrated without regard to their version. This can be improved by adding validation to ensure that the migration is only performed if the supplied version is newer.

This fix adds contract name and version checks before allowing migration.

@NoahSaso NoahSaso force-pushed the noah/rewards-audit-fix-14 branch from a5b7d9f to 89bd350 Compare August 2, 2024 03:07
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 95.08197% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (development@ec3cec7). Learn more about missing BASE report.

Files Patch % Lines
.../distribution/dao-rewards-distributor/src/error.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             development     #869   +/-   ##
==============================================
  Coverage               ?   96.64%           
==============================================
  Files                  ?      241           
  Lines                  ?    65523           
  Branches               ?        0           
==============================================
  Hits                   ?    63326           
  Misses                 ?     2197           
  Partials               ?        0           

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

@NoahSaso NoahSaso force-pushed the noah/rewards-audit-fix-14 branch 2 times, most recently from 7a6793b to ddaf28c Compare August 2, 2024 04:03
@NoahSaso NoahSaso force-pushed the noah/rewards-audit-fix-14 branch from ddaf28c to 31d0ace Compare August 12, 2024 16:38
@NoahSaso NoahSaso force-pushed the noah/rewards-audit-fix-14 branch from 31d0ace to 5dda9b8 Compare August 12, 2024 17:10
@NoahSaso NoahSaso merged commit b37c228 into development Aug 12, 2024
7 of 9 checks passed
@NoahSaso NoahSaso deleted the noah/rewards-audit-fix-14 branch August 12, 2024 17:23
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.

2 participants