]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove redundant checks
authorAlan T. DeKok <aland@freeradius.org>
Tue, 27 Apr 2021 12:57:47 +0000 (08:57 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 27 Apr 2021 12:58:14 +0000 (08:58 -0400)
src/lib/server/users_file.c

index 071668d72124e09e16a8bc24befccd39d77d1b1c..bf20496e4526f38ebd5de287357a71ecbbba00d3 100644 (file)
@@ -449,12 +449,6 @@ check_item:
                                goto fail_entry;
                        }
 
-                       if (!tmpl_is_attr(new_map->lhs)) {
-                               ERROR("%s[%d]: LHS of regular expression check must be an attribute",
-                                     file, lineno);
-                               goto fail_entry;
-                       }
-
                        /*
                         *      The default rules say that the check
                         *      items look at the control list, but
@@ -473,16 +467,6 @@ check_item:
                        goto do_insert;
                }
 
-               /*
-                *      @todo - update map_afrom_substr() to check for
-                *      regexes, too.  Maybe even normalize /foo/ =~ bar
-                */
-               if (tmpl_contains_regex(new_map->lhs)) {
-                       ERROR("%s[%d]: Unexpected regular expression on LHS of check item",
-                             file, lineno, new_map->rhs->name);
-                       goto fail_entry;
-               }
-
                if (!tmpl_is_data(new_map->rhs) && !tmpl_is_exec(new_map->rhs) &&
                    !tmpl_contains_xlat(new_map->rhs)) {
                        ERROR("%s[%d]: Invalid RHS '%s' for check item",