wireless-ap: Check that secret has the correct length and no invalid characters