Skip to content

Usage of String and UTF-8 guarantees #31

Description

@Sh3Rm4n

As of IEEE 80211-2020 9.4.2.2 SSID Element

When the UTF-8 SSID subfield of the Extended Capabilities element is equal to 1 in the frame that includes
the SSID element, or the Extended Capabilities of the source of the SSID information is known to include
the UTF-8 SSID capability based on a previously received Extended Capabilities element, the SSID is a
sequence of UTF-8 encoded code points. Otherwise, the character encoding of the octets in this SSID
element is unspecified.

As this crate does not do context aware parsing and the "Extended Capabilities" element is not parsed as well (see IEEE 80.211-2020 9.4.2.26 Bit 48), it shouldn't be assumed, that the SSID is valid UTF-8. There are also other instances of String, which might assume to much about the encoding.

What I propose is the usage of bstr for those instances.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions