Skip to content

Always use identity when hashing queries from owners#2859

Merged
joshua-spacetime merged 1 commit into
masterfrom
joshua/fix/owner-rls
Jun 12, 2025
Merged

Always use identity when hashing queries from owners#2859
joshua-spacetime merged 1 commit into
masterfrom
joshua/fix/owner-rls

Conversation

@joshua-spacetime
Copy link
Copy Markdown
Contributor

Description of Changes

Before this change, if the database owner and another client subscribed to the same query and that query had an RLS rule, both queries would get the same hash, despite not being semantically equivalent.

Now when hashing queries from the database owner, we always make sure to use their identity. This means the two queries in the above example will always hash to different values.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

  • Automated functional test

@joshua-spacetime joshua-spacetime added the bugfix Fixes something that was expected to work differently label Jun 12, 2025
Copy link
Copy Markdown
Contributor

@mamcx mamcx left a comment

Choose a reason for hiding this comment

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

LGTM

@joshua-spacetime joshua-spacetime added this pull request to the merge queue Jun 12, 2025
Merged via the queue into master with commit f4f698e Jun 12, 2025
21 checks passed
@joshua-spacetime joshua-spacetime deleted the joshua/fix/owner-rls branch June 12, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes something that was expected to work differently

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RLS stops working after opening the module dashboard on spacetimedb.com

2 participants