MCPcopy Create free account
hub / github.com/BruceDevices/firmware / sanitizeSessionLogComponent

Function sanitizeSessionLogComponent

src/modules/wifi/clients.cpp:104–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104String sanitizeSessionLogComponent(String value) {
105 value.trim();
106 if (value.isEmpty()) return "unknown";
107
108 for (size_t i = 0; i < value.length(); ++i) {
109 char c = value[i];
110 bool allowed = isAlphaNumeric(c) || c == '.' || c == '-' || c == '_';
111 if (!allowed) value.setCharAt(i, '_');
112 }
113 return value;
114}
115
116void closeSessionLogUnlocked() {
117 if (sessionLogFile) {

Callers 1

startSessionLogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected