mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-12-06 01:49:28 +00:00
fw-addr-lists: check last character of line for JSON
This is not a proof, but a line also ending with a curly bracket has higher probability of being valid JSON. Better safe than sorry... We are suffering a CVE in RouterOS: https://www.cve.org/CVERecord?id=CVE-2025-10948
This commit is contained in:
parent
a931cb61a0
commit
48d0f1f0b9
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@
|
|||
:foreach Line in=[ :deserialize $Data delimiter="\n" from=dsv options=dsv.plain ] do={
|
||||
:set Line ($Line->0);
|
||||
:local Address;
|
||||
:if ([ :pick $Line 0 1 ] = "{") do={
|
||||
:if ([ :pick $Line 0 1 ] = "{" && [ :pick $Line ([ :len $Line ] - 1) ] = "}") do={
|
||||
:do {
|
||||
:set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ];
|
||||
} on-error={ }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue