Ver Fonte

PhantomJS: Fixes rendering on Debian Buster (#18162)

Closes #17588
Leonard Gram há 6 anos atrás
pai
commit
2014549fa5
1 ficheiros alterados com 10 adições e 2 exclusões
  1. 10 2
      pkg/services/rendering/phantomjs.go

+ 10 - 2
pkg/services/rendering/phantomjs.go

@@ -67,10 +67,18 @@ func (rs *RenderingService) renderViaPhantomJS(ctx context.Context, opts Opts) (
 
 	timezone := ""
 
+	cmd.Env = os.Environ()
+
 	if opts.Timezone != "" {
 		timezone = isoTimeOffsetToPosixTz(opts.Timezone)
-		baseEnviron := os.Environ()
-		cmd.Env = appendEnviron(baseEnviron, "TZ", timezone)
+		cmd.Env = appendEnviron(cmd.Env, "TZ", timezone)
+	}
+
+	// Added to disable usage of newer version of OPENSSL
+	// that seem to be incompatible with PhantomJS (used in Debian Buster)
+	if runtime.GOOS == "linux" {
+		disableNewOpenssl := "/etc/ssl"
+		cmd.Env = appendEnviron(cmd.Env, "OPENSSL_CONF", disableNewOpenssl)
 	}
 
 	rs.log.Debug("executing Phantomjs", "binPath", binPath, "cmdArgs", cmdArgs, "timezone", timezone)