Merge pull request from GHSA-48mj-p7x2-5jfm

This commit is contained in:
Otto Winter authored and Jesse Hills committed 2021-09-28 15:39:41 +13:00
1 parent 1853407645
commit 4579f78bf9
5 files changed
+84 -28

No files matched your search

@@ -15,6 +15,17 @@ namespace web_server_base {
static const char *const TAG = "web_server_base";
void WebServerBase::add_handler(AsyncWebHandler *handler) {
// remove all handlers
if (!credentials_.username.empty()) {
handler = new internal::AuthMiddlewareHandler(handler, &credentials_);
}
this->handlers_.push_back(handler);
if (this->server_ != nullptr)
this->server_->addHandler(handler);
}
void report_ota_error() {
StreamString ss;
Update.printError(ss);