Skip to content

Commit e8c4581

Browse files
committedAug 20, 2024
fix(path): disable file path absolute check
1 parent 845440f commit e8c4581

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed
 

‎.github/workflows/build_test_ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
echo "Starting dbus-session...";
7171
eval $(dbus-launch --sh-syntax --exit-with-session);
7272
echo "Running suricata-notify with strace..."
73-
strace -f -o /tmp/suricata-notify-strace.log ./suricata-notify -v -w 60 -z 0 -e ./eve.json
73+
strace -f -o /tmp/suricata-notify-strace.log ./suricata-notify -v -w 60 -z 0 -e eve.json
7474
'
7575
7676
- name: Upload Strace Log

‎suricata-notify.c

-7
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,6 @@ int sanitize_file_input(const char *log_file)
126126
return -1;
127127
}
128128

129-
// Check if the path is absolute (optional, based on use case)
130-
if (log_file[0] != '/')
131-
{
132-
fprintf(stderr, "Error: log_file path is not absolute.\n");
133-
return -1;
134-
}
135-
136129
// Check for potential path traversal (../)
137130
if (strstr(log_file, "../") != NULL)
138131
{

0 commit comments

Comments
 (0)