Skip to content

Disallow id field for distinct batch counting

Alper Akgun requested to merge 213335-disallow-id-field-for-batch-counting into master

What does this MR do?

Disallow id field for distinct batch counting as it could lead to broken counters

  • We only disallow batch_distinct_count(model, :id)
  • We don't ban other versions of the form 'table.id' as they may make sense in join

Issue #213335 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Mayra Cabrera

Merge request reports