From: Alan T. DeKok Date: Wed, 19 Oct 2011 15:20:37 +0000 (+0200) Subject: Only "string" can have "encrypt=2" X-Git-Tag: release_3_0_0_beta0~563 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05cfd9b8dd579200e91a16ba139ceb0e5ba1bb89;p=thirdparty%2Ffreeradius-server.git Only "string" can have "encrypt=2" --- diff --git a/src/lib/dict.c b/src/lib/dict.c index 065adca125d..8ca426c52de 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -1284,6 +1284,13 @@ static int process_attribute(const char* fn, const int line, fn, line, key); return -1; } + + if ((flags.encrypt == FLAG_ENCRYPT_ASCEND_SECRET) && + (type != PW_TYPE_STRING)) { + fr_strerror_printf( "dict_init: %s[%d] Only \"string\" types can have the \"encrypt=2\" flag set.", + fn, line); + return -1; + } } else if (strncmp(key, "array", 6) == 0) { flags.array = 1;