mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
httpd: refuse a configuration with a line the replay cannot take
The replay takes a line of at most 126 bytes, so a longer one is skipped on boot. Neither the upload path nor the editor looked at line length, so the file the user saved was not the configuration the switch would come up with. Reject such a body in config_take(), before the sector is erased, which the upload path already maps to 400. The editor points at the offending line and its length, and measures it in bytes rather than characters, so a name written in a non-ASCII script is counted the way the switch counts it.
This commit is contained in:
1 parent
3a6f62b1d5
commit
3c8de6da87
3 files changed
+28
-7
No files matched your search
@@ -14,6 +14,12 @@
|
||||
|
||||
## Fixed
|
||||
|
||||
- Config
|
||||
- A startup configuration line longer than the command buffer no longer stops the replay:
|
||||
the offending line is skipped and the following lines are still applied.
|
||||
- The web UI and the configuration upload now refuse a line the replay cannot take,
|
||||
instead of writing it to flash.
|
||||
|
||||
## Breaking changes
|
||||
|
||||
- Config
|
||||
|
||||
Reference in new issue
Block a user