Mailing List Archive

[Bug 2630] New: $readsocket bug
https://bugs.exim.org/show_bug.cgi?id=2630

Bug ID: 2630
Summary: $readsocket bug
Product: Exim
Version: 4.94
Hardware: x86-64
OS: FreeBSD
Status: NEW
Severity: bug
Priority: medium
Component: String expansion
Assignee: unallocated@exim.org
Reporter: eg.sh.rab@gmail.com
CC: exim-dev@exim.org

Hello.



Faced an error in the work of the readsocket .

${readsocket{<name>}{<request>}{<options>}{<eol string>}{<fail string>}}



The problem arises when using the fourth argument ({<eol string>}) .

It forcibly removes all ā€œ\nā€ from the string it receives when requested.

In theory, everyone who uses memcached should have encountered this error.



Example:

${readsocket{inet:MEMCACHED_HOST:MEMCACHED_PORT}{get
$acl_c_memcache_key\r\n}{5s}{\n}}



In version 4.93 and lowest, this request will return:

"VALUE 123.123.123.123 0 21\r\ntest@test.com\r\nEND\r\n"



In version 4.94:
"VALUE 123.123.123.123 0 21\rtest@test.com\rEND\r"

Without ā€œ{\n}ā€ argument, this request will return:

"VALUE 123.123.123.123 0 21\r\ntest@test.com\r\nEND\r\n"



The current version of exim is:

# exim --version

Exim version 4.94 #1 (FreeBSD 11.2) built 27-Jul-2020 15:46:45

--
You are receiving this mail because:
You are on the CC list for the bug.