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

ESP8266HTTPUpdateServer::setup should make copy of username and password #4034

Closed
9a4gl opened this issue Dec 27, 2017 · 0 comments
Closed
Assignees
Labels
component: libraries good first issue If you want to help, this is is a good place to start type: bug
Milestone

Comments

@9a4gl
Copy link

9a4gl commented Dec 27, 2017

Bellow code will not work because username and password strings are later gone from stack. ESP8266HTTPUpdateServer should make copy of username and password and later use that.

void setup() {
  String username = F("admin");
  String password = F("password");
  httpUpdater.setup(&httpServer, username.c_str(), password.c_str());
}

We should replace in header (and adapt NULLs and checks)

  private:
    char * _username;
    char * _password;

with

    String _username;
    String _password;
@igrr igrr added this to the 2.5.0 milestone Dec 27, 2017
@igrr igrr added the good first issue If you want to help, this is is a good place to start label Jan 2, 2018
@devyte devyte self-assigned this Jan 3, 2018
@devyte devyte closed this as completed Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: libraries good first issue If you want to help, this is is a good place to start type: bug
Projects
None yet
Development

No branches or pull requests

3 participants