1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

OAS-9960 | less strict ArangoRoute path validation (#1774)

Co-authored-by: Adam Janikowski <12255597+ajanikow@users.noreply.github.com>
This commit is contained in:
djmeuleman 2024-11-29 15:10:46 +01:00 committed by GitHub
parent e85370817a
commit 02e4ef44b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -27,6 +27,7 @@
- (Feature) Add DebugPackage to the OPS Binary - (Feature) Add DebugPackage to the OPS Binary
- (Feature) (Networking) ArangoRoute Protocol - (Feature) (Networking) ArangoRoute Protocol
- (Feature) (Platform) Platform Requirements support - (Feature) (Platform) Platform Requirements support
- (Improvement) Drop slash requirement from ArangoRoute
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14) ## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
- (Feature) ArangoRoute CRD - (Feature) ArangoRoute CRD

View file

@ -36,7 +36,7 @@ import (
var ( var (
resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`) resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`)
apiPathRE = regexp.MustCompile(`^/([_A-Za-z0-9\-]+/)*$`) apiPathRE = regexp.MustCompile(`^(/[_A-Za-z0-9\-]+)*/?$`)
) )
const ( const (

View file

@ -36,7 +36,7 @@ func Test_ValidateAPIPath(t *testing.T) {
require.NoError(t, ValidateAPIPath("")) require.NoError(t, ValidateAPIPath(""))
require.NoError(t, ValidateAPIPath("/")) require.NoError(t, ValidateAPIPath("/"))
require.Error(t, ValidateAPIPath("//")) require.Error(t, ValidateAPIPath("//"))
require.Error(t, ValidateAPIPath("/api/zz")) require.NoError(t, ValidateAPIPath("/api/zz"))
require.NoError(t, ValidateAPIPath("/api/")) require.NoError(t, ValidateAPIPath("/api/"))
require.NoError(t, ValidateAPIPath("/api/test/qw/")) require.NoError(t, ValidateAPIPath("/api/test/qw/"))
require.NoError(t, ValidateAPIPath("/api/test/2/")) require.NoError(t, ValidateAPIPath("/api/test/2/"))