Development

This commit is contained in:
Matthew Grotke 2026-06-06 01:36:28 -04:00
parent a94863e25a
commit dc2be3e5aa
4 changed files with 29 additions and 1 deletions

View file

@ -70,6 +70,7 @@ def auth_mode_save():
if eap_protocol not in ('eap_peap', 'eap_ttls', 'eap_md5'):
eap_protocol = 'eap_peap'
tunneled_reply = 'tunneled_reply' in request.form
include_length = 'include_length' in request.form
inner_protocol = request.form.get('inner_protocol', '')
_valid_inner = {
@ -87,10 +88,15 @@ def auth_mode_save():
after['inner_protocol'] = inner_protocol
else:
after.pop('inner_protocol', None)
if eap_protocol == 'eap_ttls':
after['include_length'] = include_length
else:
after.pop('include_length', None)
else:
after.pop('eap_protocol', None)
after.pop('tunneled_reply', None)
after.pop('inner_protocol', None)
after.pop('include_length', None)
cfg.setdefault('radius', {})['options'] = after
changes = diff_fields(before, after)