Skip to content

fix: add owner authorization to set_privacy_level (Issue #332) - #344

Merged
MaryammAli merged 3 commits into
BlockDash-Studios:mainfrom
A6dulmalik:feat/332-fix-privacy-authorization
Jul 23, 2026
Merged

fix: add owner authorization to set_privacy_level (Issue #332)#344
MaryammAli merged 3 commits into
BlockDash-Studios:mainfrom
A6dulmalik:feat/332-fix-privacy-authorization

Conversation

@A6dulmalik

Copy link
Copy Markdown
Contributor

Summary

Add owner authorization to set_privacy_level in privacy.rs.

Problem

The set_privacy_level function did not call account.require_auth(), allowing any caller to modify another account's privacy level and history. The legacy boolean API (set_privacy) already enforced owner auth via owner.require_auth(), but the numeric-level API did not.

Changes

  • Added account.require_auth() as the first statement in set_privacy_level (privacy.rs)

Closes #332

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@MaryammAli
MaryammAli merged commit 1bc3fa4 into BlockDash-Studios:main Jul 23, 2026
2 checks passed
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.

set_privacy` does not consistently require owner authorization for all privacy APIs

2 participants