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

InsertBlock per workspace logic #777

Merged
merged 1 commit into from
Jul 24, 2021
Merged

InsertBlock per workspace logic #777

merged 1 commit into from
Jul 24, 2021

Conversation

chenilim
Copy link
Contributor

@chenilim chenilim commented Jul 24, 2021

This reverts the InsertBlock logic to insert per workspace. This was changed in PR #583, and due to that change, blocks with the same ID in different workspaces would fail to update. It also exposes a security hole where the workspace of a block can be changed by an insert.

Currently, the primary key of a block is WorkspaceID+ID. If / when we change that, we will need to change it across the DB store system.

@chenilim chenilim requested a review from a team as a code owner July 24, 2021 15:00
@chenilim chenilim requested review from sbishel and hahmadia and removed request for a team July 24, 2021 15:00
@chenilim chenilim requested a review from harshilsharma63 July 24, 2021 15:05
@chenilim
Copy link
Contributor Author

FYI @harshilsharma63, @sbishel, @jespino. I found this as an issue on the community server, and will cherry-pick this fix to release-0.8.0. In the mid-to-long term, we plan to refactor the block ID keys as part of the permission model changes, but this PR will maintain the existing consistency.

@chenilim chenilim merged commit 3b11202 into main Jul 24, 2021
@chenilim chenilim deleted the insert-workspace-fix branch July 24, 2021 15:08
chenilim added a commit that referenced this pull request Jul 24, 2021
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