mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-20 04:53:28 +02:00
Merge pull request from GHSA-48mj-p7x2-5jfm
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "web_server.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/util.h"
|
||||
#include "esphome/components/json/json_util.h"
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/util.h"
|
||||
|
||||
#include "StreamString.h"
|
||||
|
||||
@@ -151,9 +151,6 @@ void WebServer::setup() {
|
||||
void WebServer::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "Web Server:");
|
||||
ESP_LOGCONFIG(TAG, " Address: %s:%u", network_get_address().c_str(), this->base_->get_port());
|
||||
if (this->using_auth()) {
|
||||
ESP_LOGCONFIG(TAG, " Basic authentication enabled");
|
||||
}
|
||||
}
|
||||
float WebServer::get_setup_priority() const { return setup_priority::WIFI - 1.0f; }
|
||||
|
||||
@@ -728,10 +725,6 @@ bool WebServer::canHandle(AsyncWebServerRequest *request) {
|
||||
return false;
|
||||
}
|
||||
void WebServer::handleRequest(AsyncWebServerRequest *request) {
|
||||
if (this->using_auth() && !request->authenticate(this->username_, this->password_)) {
|
||||
return request->requestAuthentication();
|
||||
}
|
||||
|
||||
if (request->url() == "/") {
|
||||
this->handle_index_request(request);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user