Skip to content

Commit

Permalink
label keys may contain /
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasfrisch committed Oct 9, 2023
1 parent 15f115a commit c70611d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/K8sJanitor.WebApi/Models/Label.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ private void Validate(string parameterName, string parameterValue)
throw new ArgumentException("Must end with an alphanumeric character", parameterName);
}

if (Regex.IsMatch(parameterValue, @"^[a-z0-9A-Z-_.]*$") == false)
if (Regex.IsMatch(parameterValue, @"^[a-z0-9A-Z-_.\/]*$") == false)
{
throw new ArgumentException("Can only contain alphanumeric characters,'.','-' and '_'", parameterName);
throw new ArgumentException("Can only contain alphanumeric characters,'.','-','_', and '/'", parameterName);
}

if (MAX_LENGTH < parameterValue.Length)
Expand All @@ -69,4 +69,4 @@ private void Validate(string parameterName, string parameterValue)
}
}
}
}
}

0 comments on commit c70611d

Please sign in to comment.