From bc902cd4c52fec41cf2b977447696e819dc452a2 Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 14 Aug 2020 09:27:53 +0200 Subject: [PATCH 1/2] #112: Stopped indexing of large fields --- backend/go-app/main.go | 2 +- backend/go-app/walkoff.go | 16 ++++++++-------- docker-compose.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/go-app/main.go b/backend/go-app/main.go index 7004a6b5..2560b69d 100644 --- a/backend/go-app/main.go +++ b/backend/go-app/main.go @@ -370,7 +370,7 @@ type Hook struct { Id string `json:"id" datastore:"id"` Start string `json:"start" datastore:"start"` Info Info `json:"info" datastore:"info"` - Actions []HookAction `json:"actions" datastore:"actions"` + Actions []HookAction `json:"actions" datastore:"actions,noindex"` Type string `json:"type" datastore:"type"` Owner string `json:"owner" datastore:"owner"` Status string `json:"status" datastore:"status"` diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index da75a0be..db1e322f 100644 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -81,7 +81,7 @@ type AppAuthenticationStorage struct { Active bool `json:"active" datastore:"active"` Label string `json:"label" datastore:"label"` Id string `json:"id" datastore:"id"` - App WorkflowApp `json:"app" datastore:"app"` + App WorkflowApp `json:"app" datastore:"app,noindex"` Fields []AuthenticationStore `json:"fields" datastore:"fields"` Usage []AuthenticationUsage `json:"usage" datastore:"usage"` WorkflowCount int64 `json:"workflow_count" datastore:"workflow_count"` @@ -118,12 +118,12 @@ type WorkflowApp struct { Name string `json:"name" datastore:"name" yaml:"name"` Url string `json:"url" datastore:"url" yaml:"url"` } `json:"contact_info" datastore:"contact_info" yaml:"contact_info" required:false` - Actions []WorkflowAppAction `json:"actions" yaml:"actions" required:true datastore:"actions"` + Actions []WorkflowAppAction `json:"actions" yaml:"actions" required:true datastore:"actions,noindex"` Authentication Authentication `json:"authentication" yaml:"authentication" required:false datastore:"authentication"` } type WorkflowAppActionParameter struct { - Description string `json:"description" datastore:"description" yaml:"description"` + Description string `json:"description" datastore:"description,noindex" yaml:"description"` ID string `json:"id" datastore:"id" yaml:"id,omitempty"` Name string `json:"name" datastore:"name" yaml:"name"` Example string `json:"example" datastore:"example" yaml:"example"` @@ -150,7 +150,7 @@ type WorkflowAppAction struct { Sharing bool `json:"sharing" datastore:"sharing"` PrivateID string `json:"private_id" datastore:"private_id"` AppID string `json:"app_id" datastore:"app_id"` - Authentication []AuthenticationStore `json:"authentication" datastore:"authentication" yaml:"authentication,omitempty"` + Authentication []AuthenticationStore `json:"authentication" datastore:"authentication,noindex" yaml:"authentication,omitempty"` Tested bool `json:"tested" datastore:"tested" yaml:"tested"` Parameters []WorkflowAppActionParameter `json:"parameters" datastore: "parameters"` ExecutionVariable struct { @@ -175,7 +175,7 @@ type WorkflowExecution struct { Type string `json:"type" datastore:"type"` Status string `json:"status" datastore:"status"` Start string `json:"start" datastore:"start"` - ExecutionArgument string `json:"execution_argument" datastore:"execution_argument"` + ExecutionArgument string `json:"execution_argument" datastore:"execution_argument,noindex"` ExecutionId string `json:"execution_id" datastore:"execution_id"` ExecutionSource string `json:"execution_source" datastore:"execution_source"` WorkflowId string `json:"workflow_id" datastore:"workflow_id"` @@ -260,7 +260,7 @@ type Branch struct { SourceID string `json:"source_id" datastore:"source_id"` Label string `json:"label" datastore:"label"` HasError bool `json:"has_errors" datastore: "has_errors"` - Conditions []Condition `json:"conditions" datastore: "conditions"` + Conditions []Condition `json:"conditions" datastore: "conditions,noindex"` } // Same format for a lot of stuff @@ -273,7 +273,7 @@ type Condition struct { type Schedule struct { Name string `json:"name" datastore:"name"` Frequency string `json:"frequency" datastore:"frequency"` - ExecutionArgument string `json:"execution_argument" datastore:"execution_argument"` + ExecutionArgument string `json:"execution_argument" datastore:"execution_argument,noindex"` Id string `json:"id" datastore:"id"` } @@ -312,7 +312,7 @@ type Workflow struct { } type ActionResult struct { - Action Action `json:"action" datastore:"action"` + Action Action `json:"action" datastore:"action,noindex"` ExecutionId string `json:"execution_id" datastore:"execution_id"` Authorization string `json:"authorization" datastore:"authorization"` Result string `json:"result" datastore:"result,noindex"` diff --git a/docker-compose.yml b/docker-compose.yml index 8faba6f3..4a7cfb64 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: depends_on: - backend backend: - #build: ./backend + build: ./backend image: frikky/shuffle:backend container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} From 3c6409a7f7e570f2f8388e7977749c6af2b957bf Mon Sep 17 00:00:00 2001 From: frikky Date: Fri, 14 Aug 2020 09:45:08 +0200 Subject: [PATCH 2/2] #111: Fixed security issue --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 01610f43..129ec3e2 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,7 +8,7 @@ "@material-ui/icons": "^4.5.1", "@material-ui/styles": "^4.5.2", "@use-it/interval": "^0.1.3", - "class-transformer": "^0.2.0", + "class-transformer": "^0.3.1", "create-react-app": "^2.0.3", "cytoscape": "^3.11.0", "cytoscape-clipboard": "^2.2.1",