From 7f7625d9b79503d74f938f4be90bc50f926a6d56 Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Sun, 15 Aug 2021 13:57:16 -0300 Subject: imagemagick should output to stderr if we fail --- verification.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/verification.go b/verification.go index c575ae4..67bbf30 100644 --- a/verification.go +++ b/verification.go @@ -411,12 +411,14 @@ func CreateNewCaptcha(db *sql.DB) { } cmd := exec.Command("convert", "-size", "200x98", pattern, "-transparent", "white", file) + cmd.Stderr = os.Stderr err := cmd.Run() CheckError(err, "error with captcha first pass") cmd = exec.Command("convert", file, "-fill", "blue", "-pointsize", "62", "-annotate", "+0+70", captcha, "-tile", "pattern:left30", "-gravity", "center", "-transparent", "white", file) + cmd.Stderr = os.Stderr err = cmd.Run() @@ -425,6 +427,7 @@ func CreateNewCaptcha(db *sql.DB) { rnd = fmt.Sprintf("%d", rand.Intn(24)-12) cmd = exec.Command("convert", file, "-rotate", rnd, "-wave", "5x35", "-distort", "Arc", "20", "-wave", "2x35", "-transparent", "white", file) + cmd.Stderr = os.Stderr err = cmd.Run() -- cgit v1.2.3