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

Add missing asset authorization checks for some operations #2468

Merged
merged 6 commits into from
May 31, 2021

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented May 29, 2021

Add asset authorization checks for some operations.

Affected operations:

  • asset_settle_operation
    • new rule: unable to settle if not authorized by either the debt asset or collateral asset
  • bid_collateral_operation
    • new rule: unable to bid (newly bid, or update or cancel existing bid) if not authorized by either the debt asset or collateral asset
  • call_order_update_operation
    • new rule: unable to update debt position (create new position, or update or close existing position) if not authorized by either the debt asset or collateral asset
  • vesting_balance_create_operation
    • new rule: unable to create the vesting_balance object if either the creator or the receiver is not authorized by the asset
    • note: no asset authorization check on vesting_balance_withdraw_operation since in my opinion it's OK to allow the funds to be moved from vesting balance objects to account balance.

And slightly refactor nearby code for better performance.

Fixes #972, fixes #973.

Affected operations:
- asset_settle_operation
- bid_collateral_operation
- call_order_update_operation
- vesting_balance_create_operation

And slightly refactor nearby code for better performance
@abitmore abitmore added this to In progress in Feature Release (6.1.0) via automation May 29, 2021
@abitmore abitmore moved this from In progress to In testing in Feature Release (6.1.0) May 29, 2021
@abitmore abitmore removed this from In testing in Feature Release (6.1.0) May 29, 2021
@abitmore abitmore added this to In Development in Protocol Upgrade Release (6.0.0) via automation May 29, 2021
@abitmore abitmore moved this from In Development to In Testing in Protocol Upgrade Release (6.0.0) May 29, 2021
@sonarcloud
Copy link

sonarcloud bot commented May 29, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@abitmore abitmore merged commit 3f15b32 into hardfork May 31, 2021
Protocol Upgrade Release (6.0.0) automation moved this from In Testing to Done May 31, 2021
@abitmore abitmore deleted the pr-973-asset-auths branch May 31, 2021 20:36
@abitmore abitmore changed the title Add asset authorization checks for some operations Add missing asset authorization checks for some operations Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant