diff --git a/example/dictionary b/example/dictionary index 93f4685..98758b9 100644 --- a/example/dictionary +++ b/example/dictionary @@ -36,29 +36,29 @@ # directive to the end of the file if you want to see the old names # in the logfiles too. # -$INCLUDE dictionary.compat # compability issues -$INCLUDE dictionary.acc -$INCLUDE dictionary.ascend -$INCLUDE dictionary.bay -$INCLUDE dictionary.cisco -$INCLUDE dictionary.livingston -$INCLUDE dictionary.microsoft -$INCLUDE dictionary.quintum -$INCLUDE dictionary.redback -$INCLUDE dictionary.shasta -$INCLUDE dictionary.shiva -$INCLUDE dictionary.tunnel -$INCLUDE dictionary.usr -$INCLUDE dictionary.versanet -$INCLUDE dictionary.erx -$INCLUDE dictionary.freeradius -$INCLUDE dictionary.alcatel +#$INCLUDE dictionary.compat # compability issues +#$INCLUDE dictionary.acc +#$INCLUDE dictionary.ascend +#$INCLUDE dictionary.bay +#$INCLUDE dictionary.cisco +#$INCLUDE dictionary.livingston +#$INCLUDE dictionary.microsoft +#$INCLUDE dictionary.quintum +#$INCLUDE dictionary.redback +#$INCLUDE dictionary.shasta +#$INCLUDE dictionary.shiva +#$INCLUDE dictionary.tunnel +#$INCLUDE dictionary.usr +#$INCLUDE dictionary.versanet +#$INCLUDE dictionary.erx +#$INCLUDE dictionary.freeradius +#$INCLUDE dictionary.alcatel # # Following are the proper new names. Use these. # ATTRIBUTE User-Name 1 string -ATTRIBUTE User-Password 2 string +ATTRIBUTE User-Password 2 string encrypt=1 ATTRIBUTE CHAP-Password 3 octets ATTRIBUTE NAS-IP-Address 4 ipaddr ATTRIBUTE NAS-Port 5 integer diff --git a/pyrad/packet.py b/pyrad/packet.py index 53d533a..6a6cbac 100644 --- a/pyrad/packet.py +++ b/pyrad/packet.py @@ -114,7 +114,10 @@ def _DecodeValue(self, attr, value): if attr.values.HasBackward(value): return attr.values.GetBackward(value) else: - return tools.DecodeAttr(attr.type, value) + if attr.encrypt: + return tools.DecodeAttr('octets', value) + else: + return tools.DecodeAttr(attr.type, value) def _EncodeValue(self, attr, value): if attr.values.HasForward(value):