jesec / flood

A modern web UI for various torrent clients with a Node.js backend and React frontend.

Home Page:https://flood.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSS test regex and actual regex differ

pcroland opened this issue · comments

Type: Bug Report

In regex I set to download .XXX., but it downloads *XXX too as you can see here:
img
img

  • Flood 4.7.0
  • node: v12.22.10
  • npm: 6.14.16
  • latest Chrome
  • jesec/rtorrent 0.9.8-r15

Frontend:

const isMatched = new RegExp(match, 'gi').test(check);
const isExcluded = exclude !== '' && new RegExp(exclude, 'gi').test(check);

Backend:

const isMatched = new RegExp(rule.match, 'gi').test(matchField);
const isExcluded = rule.exclude !== '' && new RegExp(rule.exclude, 'gi').test(matchField);

Your issue is likely caused by \. \ requires escaping itself in JavaScript. I will check why Flood failed to do that automatically, but [.] would be a safer choice if you want to match . literally.