Skip to content

Commit aa4e9a4

Browse files
authored
Merge pull request #2641 from testssl/sieve_fix
two sieve fixes to make it work
2 parents f95ff7a + b054b5d commit aa4e9a4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

testssl.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11500,8 +11500,7 @@ starttls_full_read(){
1150011500
debugme tmln_out "${debugpad} ${one_line} "
1150111501
IFS="${oldIFS}"
1150211502
break
11503-
fi
11504-
if [[ ! ${one_line} =~ ${cont_pattern} ]]; then
11503+
elif [[ ! ${one_line} =~ ${cont_pattern} ]]; then
1150511504
debugme echo "=== full read syntax error, expected regex pattern ${cont_pattern} (cont) or ${end_pattern} (end) ==="
1150611505
IFS="${oldIFS}"
1150711506
ret_found=2
@@ -11607,9 +11606,9 @@ starttls_sieve_dialog() {
1160711606

1160811607
[[ -n "$1" ]] && starttls="$starttls\r\n$1" # this adds a payload if supplied
1160911608
debugme echo "=== starting sieve STARTTLS dialog ==="
11610-
starttls_full_read '^"' '^OK ' '"STARTTLS"' "received server capabilities and checked STARTTLS availability" &&
11609+
starttls_full_read '^"' '^OK' '"STARTTLS"' "received server capabilities and checked STARTTLS availability" &&
1161111610
starttls_just_send "$starttls" "initiated STARTTLS" &&
11612-
starttls_full_read '^OK ' '^OK ' '' "received ack for STARTTLS"
11611+
starttls_full_read '^OK' '^OK' '' "received ack for STARTTLS"
1161311612
ret=$?
1161411613
debugme echo "=== finished sieve STARTTLS dialog with ${ret} ==="
1161511614
return $ret

0 commit comments

Comments
 (0)