diff --git a/sonoff/_releasenotes.ino b/sonoff/_releasenotes.ino index 034877a45..72b5f1901 100644 --- a/sonoff/_releasenotes.ino +++ b/sonoff/_releasenotes.ino @@ -3,6 +3,7 @@ * Add random window to timers (#2447) * Add optional KNX IP Protocol Support (#2402) * Fix compile error when using ESP/Arduino library v2.3.0 by reverting KNX async UDP library to default UDP library (#2488,#2492,#2493) + * Fix configuration filename truncation when it contains spaces (#2484, #2490) * * 5.12.0l * Release rules up to 511 characters diff --git a/sonoff/webserver.ino b/sonoff/webserver.ino index 38198826e..b1e322648 100644 --- a/sonoff/webserver.ino +++ b/sonoff/webserver.ino @@ -1001,7 +1001,7 @@ void HandleBackupConfiguration() WebServer->setContentLength(sizeof(buffer)); char attachment[100]; - snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), Settings.friendlyname[0], my_version); + snprintf_P(attachment, sizeof(attachment), PSTR("attachment; filename=Config_%s_%s.dmp"), SpaceToUnderscore(Settings.friendlyname[0]), my_version); WebServer->sendHeader(F("Content-Disposition"), attachment); WebServer->send(200, FPSTR(HDR_CTYPE_STREAM), ""); memcpy(buffer, &Settings, sizeof(buffer));