diff --git a/components/gitpod-protocol/src/protocol.ts b/components/gitpod-protocol/src/protocol.ts index 84388565b790f1..ec8b4e459c1314 100644 --- a/components/gitpod-protocol/src/protocol.ts +++ b/components/gitpod-protocol/src/protocol.ts @@ -242,12 +242,18 @@ export namespace UserEnvVar { if (name.trim() === "") { return "Name must not be empty."; } + if (name.length > 255) { + return 'Name too long. Maximum name length is 255 characters.'; + } if (!/^[a-zA-Z_]+[a-zA-Z0-9_]*$/.test(name)) { return "Name must match /^[a-zA-Z_]+[a-zA-Z0-9_]*$/."; } if (variable.value.trim() === "") { return "Value must not be empty."; } + if (variable.value.length > 32767) { + return 'Value too long. Maximum value length is 32767 characters.'; + } if (pattern.trim() === "") { return "Scope must not be empty."; }