Skip to content

Commit

Permalink
fix(ui): sanitize search function to convert assignment to comparison…
Browse files Browse the repository at this point in the history
… in zniffer

Fixes #4117
  • Loading branch information
robertsLando committed Feb 4, 2025
1 parent 3d36c39 commit 6a9b851
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/views/Zniffer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ export default {
}
try {
// sanitize search function, convert assignment to comparison
search = search.replace(/([^=])=([^=])/g, '$1==$2')
const fn = new Function(
'frame, homeId, ch, src, dest, protocolDataRate, hop, dir, repeaters',
`return ${search.replace(/\\/g, '\\\\')}`,
Expand Down

0 comments on commit 6a9b851

Please sign in to comment.