Skip to content

Fix 500 error for long commit messages

What does this MR do?

Problem

Marshal.dump returns TypeError (singleton can't be dumped) for commits with long commit messages.

Solution

Introduce a 1 KiB limit for commit message on project details page. There is already a truncation logic on frontend side.

Steps to reproduce

#321862 (closed)

Screenshots (strongly suggested)

Before After
Screenshot_2021-02-28_at_11.31.21 Screenshot_2021-02-28_at_11.28.42

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 Vasilii Iakliushin

Merge request reports

Loading