]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
prevent duplications
authorAlan T. DeKok <aland@freeradius.org>
Tue, 18 Feb 2025 18:20:52 +0000 (13:20 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 18 Feb 2025 18:20:52 +0000 (13:20 -0500)
src/modules/rlm_eap/types/rlm_eap_teap/rlm_eap_teap.c

index f2e2cc3d40612adcc9cc50fe3f6a49650f596b45..fcf9717257a17b39495fe9a646d4d57724187adf 100644 (file)
@@ -224,6 +224,12 @@ static int mod_instantiate(CONF_SECTION *cs, void **instance)
                                return -1;
                        }
 
+                       if ((i == 1) && (inst->identity_type[0] == inst->identity_type[1])) {
+                               cf_log_err_cs(cs, "Duplicate value in identity_types = '%s' at %s",
+                                             inst->identity_type_name, p);
+                               return -1;
+                       }
+
                        i++;
 
                        while (isspace((uint8_t) *p)) p++;