Skip to content

WLAN/WIFI setup fails if passphrase contains dollar signs $ #189

@dbstf

Description

@dbstf

What happened

If your WLAN/WIFI password contains dollar sings "$" the WLAN/WIFI setup fails, as the password is saved incorrectly.

What did you expect to happen

Connecting to my WLAN/WIFI SSID after entering the correct password in the Web-UI during initial setup.

How to reproduce

When entering the WLAN/WIFI password in the Web-UI, no connection to the selected SSID can be established.
Manually executing
wpa_passphrase tetSSID 123testpa$sword
yields an incorrect psk hash in wpa_supplicant.conf

network={
        ssid="tetSSID"
        #psk="123testpas"
        psk=fd8a624e2369c1762b6136f80a6e1edc36ddb3ff77c0c688692115aa0e10e210
}

Note that the passphrase incorrectly clips with the dollar sign.
Escaping the dollar sign with a backslash, i.e., \$ fixes this issue. Output of
wpa_passphrase tetSSID 123testpa\$sword
(note the backslash before the dollar sign in the passphrase) yields the correct output:

network={
        ssid="tetSSID"
        #psk="123testpas$word"
        psk=ca491b674c84ea27535fc41601471459dde7541833939b85cf73340df06de5f3
}

I assume the same issue occurs during the initial setup, when the passphrase entered in the Web-UI gets parsed.
This is not a bug in RatOS per-se, but rather due to the "special char nature" of the dollar sign in bash / Linux and arises with every occurring dollar sign.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingimplementedFix is implemented in the development branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions