Ensure that we limit the length of repository names

Until now, they'd simply be truncated by the database. Now, we properly check their lengths.

Fixes https://jira.coreos.com/browse/QUAY-963
This commit is contained in:
Joseph Schorr 2018-07-08 15:20:02 +03:00
parent beebe6d5ed
commit a572fd33c7
6 changed files with 41 additions and 7 deletions

View file

@ -28,6 +28,7 @@ class V2Protocol(RegistryProtocol):
Failures.APP_REPOSITORY: 405,
Failures.ANONYMOUS_NOT_ALLOWED: 401,
Failures.INVALID_REPOSITORY: 400,
Failures.SLASH_REPOSITORY: 400,
Failures.NAMESPACE_DISABLED: 400,
},
V2ProtocolSteps.MOUNT_BLOB: {