-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
The following lines causes an exception when a unknown attribute is received from server.
"""
Add an item to attributes (by name or id)
"""
try:
code, name = self.__getkeys(key)
except KeyError:
raise ValueError('Invalid radius attribute: %s' % key)
values = self.get(code, [])
values.append(value)
UserDict.__setitem__(self, code, values)
The correct, in my opinion, is log a warning and continue the authentication. That lib does not need to validate the attributes, this is responsibility of the application using py-radius.
try:
code, name = self.__getkeys(key)
values = self.get(code, [])
values.append(value)
UserDict.__setitem__(self, code, values)
except KeyError:
LOGGER.warning('Invalid radius attribute: %s' % key)
Metadata
Metadata
Assignees
Labels
No labels