]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix RADIUS Called-Station-Id to not escape SSID
authorJouni Malinen <j@w1.fi>
Thu, 24 Dec 2015 10:15:36 +0000 (12:15 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 24 Dec 2015 10:15:36 +0000 (12:15 +0200)
commit5bd9be4d17bf1499ea75c3ee6199b8302b154b77
tree13c4f4f4f45c1c45950a5a2f41104a37686b9e9d
parent52811b8c905c40bcfda073c6a9465628ab207b86
Fix RADIUS Called-Station-Id to not escape SSID

Commit 986de33d5c3e11dd08a26ed65eacede8b75aa339 ('Convert remaining SSID
routines from char* to u8*') started using wpa_ssid_txt() to print out
the SSID for the Called-Station-Id attribute in RADIUS messages. This
was further modified by commit 6bc1f95613cc2bedd8849564d30419bff82ed074
('Use printf escaping in SSID-to-printable-string conversion') to use
printf escaping (though, even without this, wpa_ssid_txt() would have
masked characters).

This is not desired for Called-Station-Id attribute. While it is defined
as a "String", RFC 2865 indicates that "a robust implementation SHOULD
support the field as undistinguished octets.".

Copy the SSID as an array of arbitrary octets into Called-Station-Id to
avoid any kind of masking or escaping behavior. This goes a step further
from the initial implementation by allowing even the possible (but
unlikely in practical use cases) 0x00 octet in the middle of an SSID.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_1x.c