QRCoder icon indicating copy to clipboard operation
QRCoder copied to clipboard

WiFi Payload Won't Generate Correctly

Open futureflash01 opened this issue 2 years ago • 0 comments

Type of issue

Bug

Expected Behavior

WiFi Payload should generate a valid QR Code for ANY kind of string.

Current Behavior

If you explicitly provide a string within the "" parameters, the QR Code will generate correctly. However, instead of typing a hard coded SSID and password, whenever I use another variable that has a string, for example "textBox1.Text", it returns an empty string rather than using whatever text is inside the TextBox. In other words, typing in: PayloadGenerator.WiFi wifiPayload = new PayloadGenerator.WiFi("MyWiFi-SSID", "MyWiFi-Pass", PayloadGenerator.WiFi.Authentication.WPA); works fine. but typing in: PayloadGenerator.WiFi wifiPayload = new PayloadGenerator.WiFi(ssidTextBox.Text, passwordTextBox.Text, PayloadGenerator.WiFi.Authentication.WPA); does NOT work! And also, I even tried using 'ssidTextBox.Text.ToString()' and still doesn't work. I'm not sure why. A string is a string regardless.

Possible Solution (optional)

Make the PayloadGenerator.WiFi class accept ANY kind of string, rather than a hard coded value

Steps to Reproduce (for bugs)

  1. Make a TextBox for a user provided SSID or password
  2. Use the value of that textbox in a PayloadGenerator.WiFi class
  3. QR Code results in generating an empty SSID and an empty password, rather than what the user inputted

Your Environment

  • Version used: 1.4.3 (latest as of 7/2/2023)
  • Compiled from source or NuGet package?: No
  • Payload/Encoded text: ssidTextBox.Text and passwordTextBox.Text
  • Used payload generator: WiFi
  • Used ECC-level: Tried with no ECC level and tried with Q. No difference
  • Used renderer class: idk what this means, sorry
  • Environment (.NET 3.5, .NET 4.X, .NETCore, ...): .NET 4.8

futureflash01 avatar Jul 02 '23 23:07 futureflash01