From 71a8023f18d057a237ffc6ba0ed7ddac6550a928 Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Mon, 16 Apr 2012 16:20:56 +1000 Subject: [PATCH] Don't try to interpret encrypted attributes as strings. --- pyrad/packet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyrad/packet.py b/pyrad/packet.py index e3682b2..2f74305 100644 --- a/pyrad/packet.py +++ b/pyrad/packet.py @@ -111,6 +111,8 @@ def _DecodeValue(self, attr, value): if attr.values.HasBackward(value): return attr.values.GetBackward(value) else: + if attr.encrypt: + return tools.DecodeAttr('octets', value) return tools.DecodeAttr(attr.type, value) def _EncodeValue(self, attr, value):