diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 2c21d584..e0a5290a 100644 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -1512,10 +1512,22 @@ class AppBase: return returndata, is_loop def parse_liquid(template): + #print("Inside liquid with glob: %s" % globals()) try: + if len(template) > 250000: + print("Skipping liquid - size is %d" % len(template)) + return template + + if not "{{" in template or not "}}" in template: + print("Skipping liquid - missing {{ }} ") + return template + + #if not "{{" in template or not "}}" in template: + # return template + #print(globals()) - print("Running with \"%s\"" % template) + print("Running liquid with data of length %d" % len(template)) run = Liquid(template, {'mode': 'python'}) ret = run.render(**globals()) return ret @@ -1533,6 +1545,9 @@ class AppBase: print("Render error: %s" % e) except liquid.exceptions.LiquidSyntaxError as e: print("Syntax error: %s" % e) + except: + print("General exception for liquid") + pass return template @@ -1670,13 +1685,13 @@ class AppBase: # Just here in case it breaks # Implemented 02.08.2021 - print("Pre liquid: %s" % parameter["value"]) + #print("Pre liquid: %s" % parameter["value"]) try: parameter["value"] = parse_liquid(parameter["value"]) except: pass - print("POST liquid: %s" % parameter["value"]) + #print("POST liquid: %s" % parameter["value"]) return "", parameter["value"], is_loop def run_validation(sourcevalue, check, destinationvalue): diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index d98a85b3..e5b4c2e3 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -22,7 +22,7 @@ require ( github.com/docker/go-units v0.4.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect github.com/frikky/kin-openapi v0.40.0 - github.com/frikky/shuffle-shared v0.0.78 + github.com/frikky/shuffle-shared v0.0.81 github.com/fsouza/go-dockerclient v1.7.2 github.com/ghodss/yaml v1.0.0 github.com/go-git/go-billy/v5 v5.0.0 diff --git a/docker-compose.yml b/docker-compose.yml index 69ca24b7..471d1e38 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: depends_on: - backend backend: - #build: ./backend + build: ./backend image: ghcr.io/frikky/shuffle-backend:nightly container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index 872f3f71..face1f82 100644 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -1067,8 +1067,8 @@ const Workflows = (props) => { } var parsedName = data.name - if (parsedName !== undefined && parsedName !== null && parsedName.length > 22) { - parsedName = parsedName.slice(0,23)+".." + if (parsedName !== undefined && parsedName !== null && parsedName.length > 20) { + parsedName = parsedName.slice(0,21)+".." } const actions = data.actions !== null ? data.actions.length : 0