From: Arran Cudbard-Bell Date: Mon, 30 Nov 2020 20:22:43 +0000 (-0700) Subject: Don't try and cast when the RHS an attribute X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef9fed90abc79d01fcda585635217c80d10f6f75;p=thirdparty%2Ffreeradius-server.git Don't try and cast when the RHS an attribute --- diff --git a/src/lib/server/map.c b/src/lib/server/map.c index 9db968ad0b1..44ba8f36cc0 100644 --- a/src/lib/server/map.c +++ b/src/lib/server/map.c @@ -427,7 +427,7 @@ int map_afrom_sbuff(TALLOC_CTX *ctx, map_t **out, fr_sbuff_t *in, */ if (tmpl_resolve(map->rhs) < 0) goto error; - } else if (tmpl_is_attr(map->lhs)) { + } else if (tmpl_is_attr(map->lhs) && (tmpl_is_unresolved(map->rhs) || tmpl_is_data(map->rhs))) { /* * If the operator is "true" or "false", just * cast the RHS to string, as no one will care