cesanta / mongoose-os

Mongoose OS - an IoT Firmware Development Framework. Supported microcontrollers: ESP32, ESP8266, CC3220, CC3200, STM32F4, STM32L4, STM32F7. Amazon AWS IoT, Microsoft Azure, Google IoT Core integrated. Code in C or JavaScript.
https://mongoose-os.com
Other
2.49k stars 430 forks source link

http auth file #492

Open mybigman opened 5 years ago

mybigman commented 5 years ago

mos.yml doesn't use http.auth_file if preceded with a dot.

fails

config_schema:
  - ["http.auth_domain", "ADMIN"]
  - ["http.auth_file", ".htpasswd"]

works

config_schema:
  - ["http.auth_domain", "ADMIN"]
  - ["http.auth_file", "htpasswd"]

if you use the .htpasswd by manually doing mos put then it works.

Using the htpasswd without the dot exposes the file to be read unless you also include it in the http.hidden_files config.