Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Issue #249

Closed
mikecortis opened this issue Feb 23, 2025 · 4 comments
Closed

Authentication Issue #249

mikecortis opened this issue Feb 23, 2025 · 4 comments

Comments

@mikecortis
Copy link

Hello, I am utilising ElegantOTA.setAuth("username","password"); as given in https://docs.elegantota.pro/security/authentication, and managed to upload it to ESP32.
Concurrently, I've managed to upload other *.bin without setting the same above username/password.
May be I miss understood this function of setAuth, but I was hoping it would prevent unsolicited uploads on the ESP32 unless the correct username/password is set using ElegantOTA.setAuth.
Can you kindly clarify.

@mathieucarbou
Copy link
Contributor

Hello, I am utilising ElegantOTA.setAuth("username","password"); as given in https://docs.elegantota.pro/security/authentication, and managed to upload it to ESP32. Concurrently, I've managed to upload other *.bin without setting the same above username/password. May be I miss understood this function of setAuth, but I was hoping it would prevent unsolicited uploads on the ESP32 unless the correct username/password is set using ElegantOTA.setAuth. Can you kindly clarify.

Maybe try with curl or add the logging middleware to see the incoming request headers.
My assumption is that the browser (or client you use) is caching the username / password and reuses it.

@mikecortis
Copy link
Author

can you pls share an example how to upload using curl? thanks

@mikecortis
Copy link
Author

Could be that EEPROM is conflicting with Auth. in my script, I am saving data on the ESP32 flash utilizing the header EEPROM.h?

@mikecortis
Copy link
Author

i found the issue. i was declaring ElegantOTA.setAuth before ElegantOTA.begin(&server) hence why.

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

No branches or pull requests

2 participants