Don't decode attributes if there's no secret
authorAlan T. DeKok <aland@freeradius.org>
Tue, 3 May 2011 07:23:41 +0000 (09:23 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 3 May 2011 07:23:41 +0000 (09:23 +0200)
This is really a bug in the caller, but it's a reasonable
change to make.

src/lib/radius.c

index a3fbac7..ef3abbd 100644 (file)
@@ -2249,7 +2249,7 @@ static VALUE_PAIR *data2vp(const RADIUS_PACKET *packet,
        /*
         *      Decrypt the attribute.
         */
-       switch (vp->flags.encrypt) {
+       if (secret) switch (vp->flags.encrypt) {
                /*
                 *  User-Password
                 */