Alfresco / alfresco-sdk

The Alfresco In-Process SDK is based on Apache Maven, includes support for rapid and standard development, testing, packaging, versioning and release of your Alfresco integration and extension projects
Apache License 2.0
185 stars 113 forks source link

SDK4.0-beta1: substituter.sh: line 19: [: !=: unary operator expected #554

Closed tom-vandepoele closed 3 years ago

tom-vandepoele commented 5 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request

Current Behavior

Error during startup of share: /usr/local/tomcat/shared/classes/alfresco/substituter.sh: line 19: [: !=: unary operator expected

Possible Solution

add quotes to line 19 of substituter.sh if [ $CSRF_FILTER_REFERER != "" ] && [ $CSRF_FILTER_ORIGIN != "" ]; then to if [ "$CSRF_FILTER_REFERER" != "" ] && [ "$CSRF_FILTER_ORIGIN" != "" ]; then

Steps to Reproduce (for bugs)

Startup project with SDK4.0

Your Environment

Context

share-config-custom.xml not being properly updated with CSRF filter policy

Workaround

Basically copy a good version of this file into the docker image:

ohej commented 5 years ago

Hi Tom

This really should be fixed upstream in the Share docker image, rather than from within the SDK.

Can I ask that you open an issue on https://github.com/Alfresco/share ?

ohej commented 5 years ago

Essentially it should be fixed here: https://github.com/Alfresco/share/blob/master/packaging/docker/substituter.sh#L19