[exim-dev] [Bug 2619] New: Dynamic filename in json lookup

Top Page
Delete this message
Reply to this message
Author: admin
Date:  
To: exim-dev
Subject: [exim-dev] [Bug 2619] New: Dynamic filename in json lookup
https://bugs.exim.org/show_bug.cgi?id=2619

            Bug ID: 2619
           Summary: Dynamic filename in json lookup
           Product: Exim
           Version: 4.94
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Lookups
          Assignee: unallocated@???
          Reporter: eugene.istomin@???
                CC: exim-dev@???


Hello!

We have some troubles with dynamic file names in JSON lookup.

Non-working as dynamic filename in json lookup :
USERS =     ${if exists {/tmp/$domain.json} \
              {${lookup {domain} \
              json {/tmp/$domain.json} \
              }} \
            {no}}


LOG: MAIN PANIC
13:20:46.584 10151 Tainted filename for search: '/tmp/domain.com.json'
13:20:46.584 10151 ├failed to expand: ${lookup {domain} json
{/tmp/$domain.json} }} {no}}
13:20:46.584 10151 ╰───error message: NULL
13:20:46.584 10151 ├failed to expand: ${if exists {/tmp/$domain.json}
{${lookup {domain} json {/tmp/$domain.json} }} {no}}
13:20:46.584 10151 ╰───error message: NULL
13:20:46.584 10151 warn: condition test error in ACL "acl_3_check_rcpt"


Working as predefined filename in json lookup:
USERS =     ${if exists {/tmp/_domains.json} \
              {${lookup {hosted:$domain:users:$local_part} \
              json {/tmp/_domains.json} \
              }} \
            {no}}



Working as dynamic filename in wildlsearch lookup :
    condition = ${if exists
{/tmp/$acl_c_rule_section/$acl_c_rule_type/$acl_c_rule_name.wl} \
                  {${lookup{$acl_c_rule_main_lookup_var} \
                    wildlsearch
{/tmp/$acl_c_rule_section/$acl_c_rule_type/$acl_c_rule_name.wl} \
                    {yes}{no}} \
                  }{no} \
                }



So wildlsearch is ok with dynamic filenames, but json is not.

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