We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Imagine following structure:
account (Account) -> posts (Post) -> owner (User)
And following malicious code that assigns the post to an owner from a different account:
account_malicious = Account.create user_malicious = account_malicious.users.create! account_1 = Account.create ActsAsTenant.current_tenant = account_1 user_1 = account_1.users.create! post_1 = account_1.posts.create!(owner: user_1) post_1.update!(owner_id: user_malicious.id) # passes
Expected behaviour: Acts as tenant will prevent such malicious update.
I understand this is not always possible, for example for raw sql updates, but when using ORM I would expect such validation.
The example above is quite artificial, but imagine a common controller update, where you can pass the params via curl
params = { post: { owner_id: malicious_id } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Imagine following structure:
And following malicious code that assigns the post to an owner from a different account:
Expected behaviour: Acts as tenant will prevent such malicious update.
I understand this is not always possible, for example for raw sql updates, but when using ORM I would expect such validation.
The example above is quite artificial, but imagine a common controller update, where you can pass the params via curl
The text was updated successfully, but these errors were encountered: