Fossil SCM

Fix the error log parsing so that timeouts do not appear as panics.

drh 2025-09-05 15:20 trunk
Commit b2ace8830ab16a34ec6325fb290f4829b075a12c44851fce4dcf5823f0996332
1 file changed +3 -1
--- src/security_audit.c
+++ src/security_audit.c
@@ -954,11 +954,13 @@
954954
if( prevWasTime ){
955955
if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){
956956
bOutput = (eType & 0x01)!=0;
957957
nHack++;
958958
}else
959
- if( (strncmp(z,"panic: ", 7)==0 || strstr(z," assertion fault ")!=0) ){
959
+ if( (strncmp(z,"panic: ", 7)==0 && strncmp(z+7,"Timeout",7)!=0)
960
+ || strstr(z," assertion fault ")!=0
961
+ ){
960962
bOutput = (eType & 0x02)!=0;
961963
nPanic++;
962964
}else
963965
if( strncmp(z,"SMTP:", 5)==0 ){
964966
bOutput = (eType & 0x20)!=0;
965967
--- src/security_audit.c
+++ src/security_audit.c
@@ -954,11 +954,13 @@
954 if( prevWasTime ){
955 if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){
956 bOutput = (eType & 0x01)!=0;
957 nHack++;
958 }else
959 if( (strncmp(z,"panic: ", 7)==0 || strstr(z," assertion fault ")!=0) ){
 
 
960 bOutput = (eType & 0x02)!=0;
961 nPanic++;
962 }else
963 if( strncmp(z,"SMTP:", 5)==0 ){
964 bOutput = (eType & 0x20)!=0;
965
--- src/security_audit.c
+++ src/security_audit.c
@@ -954,11 +954,13 @@
954 if( prevWasTime ){
955 if( strncmp(z,"possible hack attempt - 418 ", 27)==0 ){
956 bOutput = (eType & 0x01)!=0;
957 nHack++;
958 }else
959 if( (strncmp(z,"panic: ", 7)==0 && strncmp(z+7,"Timeout",7)!=0)
960 || strstr(z," assertion fault ")!=0
961 ){
962 bOutput = (eType & 0x02)!=0;
963 nPanic++;
964 }else
965 if( strncmp(z,"SMTP:", 5)==0 ){
966 bOutput = (eType & 0x20)!=0;
967

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button