Skip to content

Ensure even select values in UNION query [RUN AS-IF-FOSS]

Adam Hegyi requested to merge ensure-even-union-selects into master

What does this MR do?

This MR adds an extra check to the Gitlab::SQL::Union class to verify the number of select values of the passed in relations. If uneven number of columns are detected, an error will be raised. This only happens in test environment.

The MR also adds documentation explaining and fixing the problem.

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • 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 Adam Hegyi

Merge request reports