JH/17 The "expand" debug selector now gives more detail, specifically on the
result of expansion operators and items.
+JH/18 Bug 2751: Fix include_directory in redirect routers. Previously a
+ bad comparison between the option value and the name of the file to
+ be included was done, and a mismatch was wrongly identified.
+ 4.88 to 4.95 are affected.
+
Exim version 4.95
-----------------
if (directory)
{
int len = Ustrlen(directory);
- uschar * p = filename + len;
+ uschar * p;
+ while (len > 0 && directory[len-1] == '/') len--; /* ignore trailing '/' */
+ p = filename + len;
if (Ustrncmp(filename, directory, len) != 0 || *p != '/')
{
*error = string_sprintf("included file %s is not in directory %s",
{
uschar temp;
int fd2;
- uschar * q = p;
+ uschar * q = p + 1; /* skip dividing '/' */
- while (*++p && *p != '/') ;
+ while (*q == '/') q++; /* skip extra '/' */
+ while (*++p && *p != '/') ; /* end of component */
temp = *p;
*p = '\0';
.include DIR/aux-var/std_conf_prefix
-
# ----- Main settings -----
r2:
driver = redirect
local_parts = include
+.ifdef INC
+ include_directory = DIR/
+.endif
data = :include:DIR/test-holey
1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
1999-03-02 09:44:33 10HmaX-0005vi-00 == include@the.local.host.name R=r2 defer (-17): error in redirect data: included file TESTSUITE/test-holey is too big (max 1048576)
1999-03-02 09:44:33 10HmaX-0005vi-00 == filter@the.local.host.name R=r1 defer (-1): TESTSUITE/test-holey is too big (max 1048576)
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 == include@the.local.host.name R=r2 defer (-17): error in redirect data: included file TESTSUITE/test-holey is too big (max 1048576)
#
exim -odi filter include
****
+exim -DINC -odi include
+****
no_msglog_check