ESPSomfy-RTS/src
cjkas 97d8a90da8 fix: review findings on the token key
- Load the token key in Web::startup(), before either web server starts,
  so no token can be made with the all-zero key; log a failed
  pref.begin().
- createAPIToken checks mbedtls' return codes. On a failure it leaves
  the token empty, which tokenMatches never accepts, instead of hex
  from uninitialised stack.
- API_TOKEN_SIZE in ApiToken.h replaces the five char[65] buffers; the
  HMAC's description moves to createAPIToken, with the None form.
- handleLogin builds the candidate token once and compares it once.
- e2e: the serverId test skips on `secured` like its neighbours, names
  its values, and says it assumes the device sees this PC's address.
- KNOWN_ISSUES keeps #81, which #108 removes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 20:39:08 +01:00
..
entryPoints fix: review findings on the token key 2026-10-27 20:39:08 +01:00
outputs fix: review findings on the token key 2026-10-27 20:39:08 +01:00
ApiToken.h fix: review findings on the token key 2026-10-27 20:39:08 +01:00
ConfigFile.cpp feat: keep Ethernet settings independent of the framework 2026-10-19 21:13:49 +02:00
ConfigFile.h fix: stop the 5 s boot wait, tell the client about a bad restore 2026-10-19 18:08:16 +02:00
ConfigHeader.h fix: stop the 5 s boot wait, tell the client about a bad restore 2026-10-19 18:08:16 +02:00
ConfigSettings.cpp feat: remove the GitHub update 2026-10-22 21:28:23 +02:00
ConfigSettings.h feat: remove the GitHub update 2026-10-22 21:28:23 +02:00
DeviceOps.cpp fix: review findings on the token key 2026-10-27 20:39:08 +01:00
DeviceOps.h fix: settings ops review findings 2026-10-25 10:27:53 +01:00
ESPNetwork.cpp fix: e2e failures on the device: edit replies before their events, /ws closed on reboot 2026-10-25 12:43:06 +01:00
ESPNetwork.h feat: settings ops, the WiFi and frequency scans, and reboot for socket protocol 2 2026-10-25 09:52:09 +01:00
EthPhy.h feat: keep Ethernet settings independent of the framework 2026-10-19 21:13:49 +02:00
JsonFormatter.cpp feat: socket protocol 2 core on ws://host/ws 2026-10-24 11:03:07 +02:00
JsonFormatter.h feat: socket protocol 2 core on ws://host/ws 2026-10-24 11:03:07 +02:00
LoginThrottle.h fix: review findings on the login throttle 2026-10-27 18:44:39 +01:00
LogLock.cpp build: move to pioarduino 55.03.312 (Arduino 3.3.12, ESP-IDF 5.5) 2026-10-19 22:05:22 +02:00
LogLockPolicy.h fix: don't wait on a log lock holder that can't run 2026-10-12 18:35:42 +02:00
LoopQueue.cpp fix: settings ops review findings 2026-10-25 10:27:53 +01:00
LoopQueue.h fix: settings ops review findings 2026-10-25 10:27:53 +01:00
ModelEditor.cpp fix: deletes send their removal after the reply; test_reboot waits for the restart 2026-10-25 13:07:17 +01:00
ModelEditor.h fix: deletes send their removal after the reply; test_reboot waits for the restart 2026-10-25 13:07:17 +01:00
ModelSnapshot.cpp fix: edit ops review findings 2026-10-24 18:10:06 +02:00
ModelSnapshot.h test: prove no read item can outgrow the snapshot unit 2026-10-17 23:29:04 +02:00
MqttConnection.cpp fix: only touch the task watchdog from tasks that are subscribed to it 2026-10-21 13:45:04 +02:00
MqttConnection.h refactor: split the transports into the modules GLOSSARY.md names 2026-10-16 13:47:56 +02:00
ProtoAssembly.cpp fix: edit ops review findings 2026-10-24 18:10:06 +02:00
ProtoAssembly.h fix: edit ops review findings 2026-10-24 18:10:06 +02:00
ProtoEdits.cpp feat: settings ops, the WiFi and frequency scans, and reboot for socket protocol 2 2026-10-25 09:52:09 +01:00
ProtoEdits.h fix: edit ops second review findings 2026-10-24 18:29:34 +02:00
ProtoFrame.cpp fix: protocol 2 core review findings 2026-10-24 13:17:15 +02:00
ProtoFrame.h fix: edit ops review findings 2026-10-24 18:10:06 +02:00
ProtoOps.cpp fix: edit ops second review findings 2026-10-24 18:29:34 +02:00
ProtoOps.h fix: edit ops second review findings 2026-10-24 18:29:34 +02:00
ProtoParse.cpp feat: settings ops, the WiFi and frequency scans, and reboot for socket protocol 2 2026-10-25 09:52:09 +01:00
ProtoParse.h feat: settings ops, the WiFi and frequency scans, and reboot for socket protocol 2 2026-10-25 09:52:09 +01:00
ProtoSchema.cpp fix: edit ops review findings 2026-10-24 18:10:06 +02:00
ProtoSchema.h fix: drop Secure Config Only permissions from protocol 2 2026-10-25 11:11:19 +01:00
ProtoSettings.cpp fix: drop Secure Config Only permissions from protocol 2 2026-10-25 11:11:19 +01:00
ProtoSettings.h feat: settings ops, the WiFi and frequency scans, and reboot for socket protocol 2 2026-10-25 09:52:09 +01:00
ProtoSlots.cpp fix: protocol 2 core review findings 2026-10-24 13:17:15 +02:00
ProtoSlots.h fix: protocol 2 core review findings 2026-10-24 13:17:15 +02:00
ProtoSync.cpp fix: protocol 2 core review findings 2026-10-24 13:17:15 +02:00
ProtoSync.h feat: socket protocol 2 core on ws://host/ws 2026-10-24 11:03:07 +02:00
PulseDecoder.cpp refactor: move the RX pulse decoder into PulseDecoder 2026-10-13 21:21:05 +02:00
PulseDecoder.h refactor: move the RX pulse decoder into PulseDecoder 2026-10-13 21:21:05 +02:00
RadioScheduler.cpp refactor: name radio jobs as GLOSSARY.md does 2026-10-13 15:13:03 +02:00
RadioScheduler.h refactor: name radio jobs as GLOSSARY.md does 2026-10-13 15:13:03 +02:00
RollingCode.h refactor: rename what is left of Somfy.cpp to SomfyShade.cpp 2026-10-13 20:47:14 +02:00
Secrets.h fix: keep stored secrets when an older UI sends them empty 2026-10-18 20:07:31 +02:00
ShadeBehaviour.cpp cleanup: drop the step cases onWaitingFrame never reaches 2026-10-17 23:25:16 +02:00
ShadeBehaviour.h fix: keep a tilt-only shade's lift at 100 whatever sends the command 2026-10-16 22:47:53 +02:00
ShadeChanges.cpp refactor: send shade and group changes once per loop() pass 2026-10-16 10:40:44 +02:00
ShadeChanges.h feat: socket protocol 2 core on ws://host/ws 2026-10-24 11:03:07 +02:00
ShadeController.cpp fix: deletes send their removal after the reply; test_reboot waits for the restart 2026-10-25 13:07:17 +01:00
ShadeGpio.cpp refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
ShadeMotion.cpp fix: default a set-favorite request's tilt to the favorite tilt 2026-10-14 15:57:49 +02:00
ShadeMotion.h fix: default a set-favorite request's tilt to the favorite tilt 2026-10-14 15:57:49 +02:00
ShadeRequests.cpp fix: command op replies that said ok when nothing was done 2026-10-24 13:46:00 +02:00
ShadeRequests.h fix: command op replies that said ok when nothing was done 2026-10-24 13:46:00 +02:00
ShadeSensors.cpp fix: move only the tilt of a tilt-only shade for sun and wind 2026-10-13 21:14:20 +02:00
ShadeSensors.h fix: move only the tilt of a tilt-only shade for sun and wind 2026-10-13 21:14:20 +02:00
ShadeSettings.h refactor: hold shade settings in ShadeSettings and RemoteSettings 2026-10-16 20:31:39 +02:00
ShadeTypes.h refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
Somfy.h feat: edit ops and the reads their forms need, for socket protocol 2 2026-10-24 14:29:53 +02:00
SomfyController.cpp feat: socket protocol 2 core on ws://host/ws 2026-10-24 11:03:07 +02:00
SomfyEditor.h fix: edit ops review findings 2026-10-24 18:10:06 +02:00
SomfyFrame.cpp refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
SomfyFrame.h refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
SomfyGroup.cpp refactor: hold shade settings in ShadeSettings and RemoteSettings 2026-10-16 20:31:39 +02:00
SomfyJson.cpp fix: deletes send their removal after the reply; test_reboot waits for the restart 2026-10-25 13:07:17 +01:00
SomfyRemote.cpp refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
SomfyShade.cpp refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
SomfyShadeOps.cpp fix: command op replies that said ok when nothing was done 2026-10-24 13:46:00 +02:00
SomfyShadeOps.h refactor: carry out shade requests from one module behind a LoopQueue 2026-10-16 09:42:58 +02:00
SomfySnapshot.cpp refactor: move the shade's behaviour into ShadeBehaviour 2026-10-16 21:21:38 +02:00
SomfySnapshot.h refactor: serve the read routes from a ModelSnapshot that loop() fills 2026-10-16 10:05:22 +02:00
SSDP.cpp feat: keep Ethernet settings independent of the framework 2026-10-19 21:13:49 +02:00
SSDP.h init 2026-03-10 20:23:48 +01:00
TaskWdt.h fix: only touch the task watchdog from tasks that are subscribed to it 2026-10-21 13:45:04 +02:00
Timing.h refactor: time steps with ElapsedTimer::lap() 2026-10-13 15:39:14 +02:00
Transceiver.cpp fix: protocol 2 core review findings 2026-10-24 13:17:15 +02:00
Transceiver.h refactor: move the RX pulse decoder into PulseDecoder 2026-10-13 21:21:05 +02:00
TxBuffer.cpp test: cover the radio queue rules, shade TX state, rolling codes and web command hold 2026-10-12 20:26:33 +02:00
TxBuffer.h refactor: name radio jobs as GLOSSARY.md does 2026-10-13 15:13:03 +02:00
Utils.cpp fix: send socket events only from loop() 2026-10-21 15:27:21 +02:00
Utils.h fix: send socket events only from loop() 2026-10-21 15:27:21 +02:00
WResp.cpp fix: track the JSON length instead of recounting it 2026-10-12 16:04:13 +02:00
WResp.h feat: log timings for slow work, socket clients and boot crashes 2026-10-11 20:35:43 +02:00