{"record":{"id":"ec3c8ca48b9b4222","repo":"crowdsecurity/crowdsec","slug":"appname-is-too-long","errorCode":null,"errorMessage":"appname is too long","messagePattern":"appname is too long","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go","lineNumber":182,"sourceCode":"\t}\n\n\tappname := []byte{}\n\tfor r.position < r.len {\n\t\tc := r.buf[r.position]\n\t\tif c == ' ' {\n\t\t\tr.position++\n\t\t\tbreak\n\t\t}\n\t\tappname = append(appname, c)\n\t\tr.position++\n\t}\n\n\tif len(appname) == 0 {\n\t\treturn errors.New(\"appname is empty\")\n\t}\n\n\tif len(appname) > 48 {\n\t\treturn errors.New(\"appname is too long\")\n\t}\n\n\tr.Tag = string(appname)\n\treturn nil\n}\n\nfunc (r *RFC5424) parseProcID() error {\n\tif r.buf[r.position] == NIL_VALUE {\n\t\tr.PID = \"\"\n\t\tr.position += 2\n\t\treturn nil\n\t}\n\n\tprocid := []byte{}\n\tfor r.position < r.len {\n\t\tc := r.buf[r.position]\n\t\tif c == ' ' {\n\t\t\tr.position++","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go#L164-L200","documentation":"Returned by parseAppName when the APPNAME field exceeds 48 characters, the maximum length CrowdSec's RFC5424 parser accepts for this field. The field is read up to the next space, so an over-long token (often a misformatted message where a later field spills into APPNAME) triggers it.","triggerScenarios":"Thrown at pkg/acquisition/modules/syslog/internal/parser/rfc5424/parse.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Shorten the APPNAME emitted by the syslog client to at most 48 characters","Check that earlier header fields are properly space-separated so APPNAME doesn't absorb following fields"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}