-
- Downloads
Send TODOs for comments on commits correctly
At present, the TodoService uses the `:read_project` ability to decide whether a user can read a note on a commit. However, commits can have a visibility level that is more restricted than the project, so this is a security issue. This commit changes the code to use the `:read_commit` ability in this case instead, which ensures TODOs are only generated for commit notes if the users can see the commit.
Showing
- app/services/todo_service.rb 2 additions, 4 deletionsapp/services/todo_service.rb
- changelogs/unreleased/security-64711-fix-commit-todos.yml 5 additions, 0 deletionschangelogs/unreleased/security-64711-fix-commit-todos.yml
- spec/services/todo_service_spec.rb 105 additions, 16 deletionsspec/services/todo_service_spec.rb
Please register or sign in to comment