Skip to content

Check for valid refs in CommitController before doing anything

Stan Hu requested to merge sh-reject-refs-with-invalid-chars into master

Before a 404 would be rendered only after a request to Gitaly would return with an InvalidArgument error. Now we check that the ref have a valid format before sending it to Gitaly. In both cases, a 404 is returned to the user, but this change prevents Gitaly from generating error noise in production.

Closes gitaly#1425 (closed)

Merge request reports