Skip to content

Commit 7564bfd

Browse files
committed
🐛fix log parser in API
1 parent 345a8de commit 7564bfd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

controlpanel/api/services/logs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ module.exports = {
130130
if (log.log.length > 1500) {
131131
errors.push({ log, error: '.log attribute is too long' });
132132
}
133-
// Updated regular expression to remove ambiguity and ensure efficient matching
134-
const matchLog = log.log.match(/^cad-filter:\s*(?<log>[^"\s]+).*$/);
133+
const matchLog = log.log.match(/.*cad-filter:\s*(?<log>.*)(?:\s|\\t).*$/);
135134
if (matchLog != null) log.log = matchLog.groups.log;
136135
if (!isJSON(log.log)) {
137136
errors.push({ log, error: '.log attribute is not a JSON' });

0 commit comments

Comments
 (0)