checkmk icon indicating copy to clipboard operation
checkmk copied to clipboard

aruba_wlc_clients: use utf8 instead of ascii decoding

Open mabezi opened this issue 1 year ago • 3 comments

General information

Affected devices: WLAN controllers from Aruba The aruba_wlc_clients check shows how many clients are connected for each SSID.

As far as I know, IEEE 802.11 (correct me if I'm wrong, but I think this was introduced with IEEE 802.11-2007 or IEEE 802.11-2012) specifies that an SSID may contain any UTF-8 character. Limiting it to the ASCII character set would therefore be insufficient and lead to errors.

Bug reports

Information about the system or setup should be unimportant, as the error can be reproduced completely independently of the setup and we are talking about a standard here.

Example with ASCII encoding:

>>> bytes(int(x) for x in "11.195.164".split(".")[1:]).decode("ascii")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)

Proposed changes

UTF-8 is used instead of ASCII encoding. I don't think this would break any running system.

>>> bytes(int(x) for x in "11.195.164".split(".")[1:]).decode("utf8")
'ä'

mabezi avatar Jul 30 '24 23:07 mabezi

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Jul 30 '24 23:07 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

mabezi avatar Jul 30 '24 23:07 mabezi

recheck

mabezi avatar Jul 30 '24 23:07 mabezi

Hey mabezi, this PR will be released with Werk #17497 / 2eb74bb2e198f26629ca8ad7bf90bfb02dc58b56. Thanks a lot for your support!

cellador avatar Mar 31 '25 07:03 cellador