fix Bug 68320 - Fix output during WOPI configuration (#741)

This commit is contained in:
Evgeniy Antonyuk 2024-06-03 17:33:07 +03:00 committed by GitHub
parent 85ddd66d9f
commit cf29c757a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -406,16 +406,16 @@ update_ds_settings(){
WOPI_MODULUS=$(openssl rsa -pubin -inform "MS PUBLICKEYBLOB" -modulus -noout -in "${WOPI_PUBLIC_KEY}" | sed 's/Modulus=//')
WOPI_EXPONENT=$(openssl rsa -pubin -inform "MS PUBLICKEYBLOB" -text -noout -in "${WOPI_PUBLIC_KEY}" | grep -oP '(?<=Exponent: )\d+')
${JSON} -e "if(this.wopi===undefined)this.wopi={};"
${JSON} -e "this.wopi.enable = ${WOPI_ENABLED}"
${JSON} -e "this.wopi.privateKey = '$(openssl base64 -in ${WOPI_PRIVATE_KEY} -A)'"
${JSON} -e "this.wopi.privateKeyOld = '$(openssl base64 -in ${WOPI_PRIVATE_KEY} -A)'"
${JSON} -e "this.wopi.publicKey = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -e "this.wopi.publicKeyOld = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -e "this.wopi.modulus = '${WOPI_MODULUS}'"
${JSON} -e "this.wopi.modulusOld = '${WOPI_MODULUS}'"
${JSON} -e "this.wopi.exponent = '${WOPI_EXPONENT}'"
${JSON} -e "this.wopi.exponentOld = '${WOPI_EXPONENT}'"
${JSON} -I -e "if(this.wopi===undefined)this.wopi={};"
${JSON} -I -e "this.wopi.enable = ${WOPI_ENABLED}"
${JSON} -I -e "this.wopi.privateKey = '$(openssl base64 -in ${WOPI_PRIVATE_KEY} -A)'"
${JSON} -I -e "this.wopi.privateKeyOld = '$(openssl base64 -in ${WOPI_PRIVATE_KEY} -A)'"
${JSON} -I -e "this.wopi.publicKey = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -I -e "this.wopi.publicKeyOld = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -I -e "this.wopi.modulus = '${WOPI_MODULUS}'"
${JSON} -I -e "this.wopi.modulusOld = '${WOPI_MODULUS}'"
${JSON} -I -e "this.wopi.exponent = '${WOPI_EXPONENT}'"
${JSON} -I -e "this.wopi.exponentOld = '${WOPI_EXPONENT}'"
if [ "${ALLOW_META_IP_ADDRESS}" = "true" ] || [ "${ALLOW_PRIVATE_IP_ADDRESS}" = "true" ]; then
${JSON} -I -e "if(this.services.CoAuthoring['request-filtering-agent']===undefined)this.services.CoAuthoring['request-filtering-agent']={}"