]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't try and cast when the RHS an attribute
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 30 Nov 2020 20:22:43 +0000 (13:22 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 30 Nov 2020 20:22:49 +0000 (13:22 -0700)
src/lib/server/map.c

index 9db968ad0b12437ccf0f5ffd73c502dc873e3e17..44ba8f36cc0c2657cc22a071569f31acd633e9bc 100644 (file)
@@ -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