Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aruba_wlc_clients: use utf8 instead of ascii decoding #738

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mabezi
Copy link

@mabezi mabezi commented Jul 30, 2024

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")
'ä'

Copy link

github-actions bot commented Jul 30, 2024

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

@mabezi
Copy link
Author

mabezi commented Jul 30, 2024

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

@mabezi
Copy link
Author

mabezi commented Jul 30, 2024

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants