Commit 5b56239
senyong.wang
fix: correct timeStrCache calculation to exclude unmatched trailing chars
Use strptimeResult position (actual matched end) instead of curTimeStr.length()
when building the second-level cache. This fixes cache pollution when the time
string contains trailing characters not matched by the format string (e.g. timezone
suffix +08:00). Also add unit test to verify the fix.1 parent 7099f79 commit 5b56239
2 files changed
Lines changed: 27 additions & 1 deletion
File tree
- core
- plugin/processor
- unittest/processor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
894 | 914 | | |
895 | 915 | | |
896 | 916 | | |
| |||
0 commit comments