Skip to content

Add password for OTA upload to LittleFS#18

Open
LeisureLadi wants to merge 6 commits intoearlephilhower:masterfrom
LeisureLadi:master
Open

Add password for OTA upload to LittleFS#18
LeisureLadi wants to merge 6 commits intoearlephilhower:masterfrom
LeisureLadi:master

Conversation

@LeisureLadi
Copy link
Copy Markdown

The dialogbox requests a password, even it may not be required. If you know, that OTA is not protected by password, leave the box empty and continue. The upload script is then called as before.

If a password is entered, the script will be executed with the -a option and the password.

Password capability added to plug-in.
If none required simply leave it empty. Use this plug-in only, if you had enough of flashing stupid temporary sketches without password, just to upload the file system and then flash again the final sketch. The dialog box will show up every time, even there is no password required (sorry, can't be avoided without modifying too much).
If a password is required to upload LittleFS via OTA, it can be entered now. Downside is, that the dialog box shows up every time. Simply leave it empty, if no password is required. In case you don't like this "extra" effort, don't use this plug-in.
For ESP8266 OTA upload of LittleFS
@877dev 877dev mentioned this pull request Jul 26, 2021
System.out.println("[LittleFS] IP : "+serialPort);
System.out.println();
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath});

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you could actually see if an AUTH is needed before presenting the box? I understand that you're using it, but since ArduinoOTA is so insecure anyway I have a feeling that most people will not be using a password at all.

It's possible to probe the board using UDP comms (connect to ESP8266, send SPIFFS command, check for AUTH response, see espota.py), or even just call espota.py once, and if it fails then prompt for a PWD and try again.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice and simple, BTW! Just trying to make the default case the easiest/simplest for end users.

@earlephilhower earlephilhower self-requested a review July 29, 2021 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants