Skip to content

Commit c2db193

Browse files
committed
fix to_count causing errors with column_number
1 parent 29aeb8c commit c2db193

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/main.bro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export {
1616
referrer: string &log &optional;
1717
violated_directive: string &log &optional;
1818
original_policy: string &optional;
19-
column_number: count &log &optional;
20-
line_number: count &log &optional;
19+
column_number: string &log &optional;
20+
line_number: string &log &optional;
2121
blocked_uri: string &log &optional;
2222
};
2323

@@ -48,8 +48,8 @@ function parse_report(buf: string): csp_report
4848
r$referrer = extract_between(buf, /\"referrer\"\:\"/, /\"/);
4949
r$violated_directive = extract_between(buf, /\"violated-directive\"\:\"/, /\"/);
5050
r$original_policy = extract_between(buf, /\"original-policy\"\:\"/, /\"/);
51-
r$column_number = to_count(extract_between(buf, /\"column-number\":/, /,/));
52-
r$line_number = to_count(extract_between(buf, /\"line-number\":/, /,/));
51+
r$column_number = extract_between(buf, /\"column-number\":/, /,/);
52+
r$line_number = extract_between(buf, /\"line-number\":/, /,/);
5353
r$blocked_uri = extract_between(buf, /\"blocked-uri\"\:\"/, /\"/);
5454
return r;
5555
}

0 commit comments

Comments
 (0)