]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
warn on short shared secrets
authorAlan T. DeKok <aland@freeradius.org>
Wed, 7 Aug 2024 23:11:08 +0000 (19:11 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 7 Aug 2024 23:11:18 +0000 (19:11 -0400)
src/main/client.c

index 6e89fafc16a217964e6a783dc16e68e43e3b4149..6e1a684da6a8ac5d6ef9e3fe65c2768e37e9507d 100644 (file)
@@ -1216,6 +1216,14 @@ done_coa:
                }
        }
 
+       /*
+        *      Be annoying to people, but it's about security.
+        */
+       if (strlen(c->secret) < 12) {
+               WARN("Shared secret for client %s is short, and likely can be broken by an attacker.",
+                    c->shortname);
+       }
+
        return c;
 }