1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-06-09 19:33:35 +00:00

test: Update expected strings to Go 1.25.11/1.26.4

In Go 1.25.11/1.26.4, net/textproto error formatting was changed, and
now the message is quoted. This is to protect from general string
injections.

See https://go-review.googlesource.com/c/go/+/778182 and
ec1c380418ec6a0da28d4519872e2b81ba9152ba.

After this change, the error strings from net/textproto (and net/smtp
which uses it) now include quotes.

For chasquid, the only user-observable change in the server is that the
errors included in the DSN messages are now quoted, which should not be
a problem.

However, some of the tests which validate error strings need to be
adjusted.

The patch also updates go.mod to set the Go version to match this new
minimum.
This commit is contained in:
Alberto Bertogli
2026-06-07 00:07:42 +01:00
parent 2b8f206842
commit ab2a6e7eb3
5 changed files with 30 additions and 31 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ check "SPF_PASS=0"
if smtpc blockme@testserver < content >.logs/smtpc.log 2>&1; then
fail "ERROR: hook did not block email as expected"
fi
if ! grep -q "451 ¡No pasarán!" .logs/smtpc.log; then
if ! grep -q '451 "¡No pasarán!"' .logs/smtpc.log; then
cat .logs/smtpc.log
fail "ERROR: transient hook error not returned correctly"
fi
@@ -63,7 +63,7 @@ fi
if smtpc permanent@testserver < content >.logs/smtpc.log 2>&1; then
fail "ERROR: hook did not block email as expected"
fi
if ! grep -q "554 Nos hacemos la permanente" .logs/smtpc.log; then
if ! grep -q '554 "Nos hacemos la permanente"' .logs/smtpc.log; then
cat .logs/smtpc.log
fail "ERROR: permanent hook error not returned correctly"
fi
+2 -2
View File
@@ -26,7 +26,7 @@ Delivery of your message to the following recipient(s) failed permanently:
Technical details:
- "userB@srv-b" (EMAIL) failed permanently with error:
MAIL+RCPT 550 5.7.23 SPF check failed: matched all
MAIL+RCPT 550 "5.7.23 SPF check failed: matched all"
--???????????
@@ -40,7 +40,7 @@ Original-Recipient: utf-8; userB@srv-b
Final-Recipient: utf-8; userB@srv-b
Action: failed
Status: 5.0.0
Diagnostic-Code: smtp; MAIL+RCPT 550 5.7.23 SPF check failed: matched all
Diagnostic-Code: smtp; MAIL+RCPT 550 "5.7.23 SPF check failed: matched all"