changedetection.io icon indicating copy to clipboard operation
changedetection.io copied to clipboard

String in Global Filters > Ignore text is not being ignored

Open dtrezubSV opened this issue 8 months ago • 21 comments

Describe the bug String in Global Filters > Ignore text is not being ignored

Version 0.49.14

How did you install? Paid subscription

To Reproduce

Steps to reproduce the behavior:

  1. On Global Filters > Ignore text
  2. Add config_nonce or honeypot to the Ignore Text field
  3. Trigger a check for source:https://www.simplevote.ca/carrieres/?no-cache
  4. See the line is triggered: var gform_theme_config = {"common":{"form":{"honeypot":{"version_hash":"a3dcb1294aa952da9424f2838028ef70"},"ajax":{"ajaxurl":"https:\/\/www.simplevote.ca\/wp-admin\/admin-ajax.php","ajax_submission_nonce":"2a85118d55","i18n":{"step_announcement":"Step %1$s of %2$s, %3$s","unknown_error":"There was an unknown error processing your request. Please try again."}}}},"hmr_dev":"","public_path":"https:\/\/www.simplevote.ca\/wp-content\/plugins\/gravityforms\/assets\/js\/dist\/","config_nonce":"415c029d54"};

Example URL: https://lemonade.changedetection.io/intriguingly-suffices/edit/737b1a1d-853d-4ff7-a50b-eaee965c7669

Expected behavior I expect the line containing the strings in Ignore Text field to be ignored.

Screenshots My General Filters screen: Image

The line being triggered: Image

dtrezubSV avatar Apr 17 '25 21:04 dtrezubSV

hello, please write to us on the contact email address (see your signup email)

dgtlmoon avatar Apr 17 '25 21:04 dgtlmoon

aaah you added the link to your hosted account, i see it, thanks

dgtlmoon avatar Apr 17 '25 21:04 dgtlmoon

yeah so it will be "ignored" but it will still show up in the difference, its just that the change will not trigger a notification/change

does that make sense?

dgtlmoon avatar Apr 17 '25 21:04 dgtlmoon

yeah so it will be "ignored" but it will still show up in the difference, its just that the change will not trigger a notification/change

does that make sense?

How is the Ignore Text field supposed to work, after all?

For my use case (monitor for malicious changes), it could be completely ignored and not flagged at all. But showing up in the diff with a different colour and not triggering a change would work as well.

dtrezubSV avatar Apr 17 '25 22:04 dtrezubSV

How is the Ignore Text field supposed to work, after all?

It will ignore lines that match that text (those lines are not considered for change detection)

dgtlmoon avatar Apr 17 '25 22:04 dgtlmoon

@dtrezubSV https://github.com/dgtlmoon/changedetection.io/issues/2997 it sounds to me like most people are getting confused by this, does this #2997 solve your issue?

dgtlmoon avatar Apr 17 '25 22:04 dgtlmoon

https://github.com/dgtlmoon/changedetection.io/issues/2899

dgtlmoon avatar Apr 17 '25 22:04 dgtlmoon

Another example:

I have honeypot in Global Filters > Ignore Text (see screenshot above). It correctly interprets it when I look at the preview for individual URLs, but it still triggers a change alert

Preview: Image

Change detected: Image

dtrezubSV avatar Apr 18 '25 14:04 dtrezubSV

How is the Ignore Text field supposed to work, after all?

It will ignore lines that match that text (those lines are not considered for change detection)

The bug is that those lines are still triggering a change alert. I have examples where the only change in an alert is one that should have been ignored, so it was definitely an ignored text which triggered the alert.

here's one instance: I have /\?v=\d/ in my Global Filters > Ignore Text Here's the ONLY line being triggered:

Image

This is the URL, where you can see there is no other line being flagged as changed: https://lemonade.changedetection.io/intriguingly-suffices/diff/8a605604-882d-4f1b-a096-f0a320c42317?from_version=1744887676#text

dtrezubSV avatar Apr 18 '25 14:04 dtrezubSV

@dtrezubSV #2997 it sounds to me like most people are getting confused by this, does this #2997 solve your issue?

No. I believe my report is for a real bug. See my last comment above, please.

dtrezubSV avatar Apr 18 '25 14:04 dtrezubSV

I added /\?v=\d/ as a global filter then some basic HTML to a test html on my server (as source:https://test-server......html)

Image

grey means that it correctly ignores that whole line.

i changed the ?v=2222 to ?v=3333 and rechecked it and a change wasnt detected

so hmmm

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

@dtrezubSV do you have any options like "added" "removed" or "changed" set when it happened?

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

Thank you for looking into this!

@dtrezubSV do you have any options like "added" "removed" or "changed" set when it happened?

This is my full settings page for that URL. Do you see anything that would trigger the change detection?

Image

dtrezubSV avatar Apr 22 '25 17:04 dtrezubSV

hmm no... there is a test for the global filters which works fine also

but looking in your data i can see

# diff *txt
167c167
< <link href="https://www.simplyvoting.com/wp-content/themes/my-little-big-theme-child/style2.css?v=1744887677" rel="stylesheet"/>
---
> <link href="https://www.simplyvoting.com/wp-content/themes/my-little-big-theme-child/style2.css?v=1744922889" rel="stylesheet"/>

the last two snapshots - the only difference was that ?v=...

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

I'm finding this one hard/impossible to replicate

does it happen still?

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

in https://lemonade.changedetection.io/intriguingly-suffices/diff/3ec0692a-6fa0-42e4-9302-7c9a7f9f0009?from_version=1745334107#text

if you set the diff to word mode, its the name in iframe which triggers the change and you dont have a filter for that

Image

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

Can you tell me what the goal of this watch is? you want to know when the html changes, or what are you doing in the big picture here? what do you do personally when the change happens? what are you watching for?

dgtlmoon avatar Apr 22 '25 17:04 dgtlmoon

Can you tell me what the goal of this watch is? you want to know when the html changes, or what are you doing in the big picture here? what do you do personally when the change happens? what are you watching for?

I think I said this earlier, but I may not have explained it clearly.

Our goal is to detect unauthorized or malicious changes to our website. If a hacker gains access, they might modify a link or insert a script. These changes can be harmful. We need to detect them as soon as they happen.

To do this, I review every change that is included in an alert (red.green text). I check if it was intentional or if it might be a sign that someone hacked the site.

The reason this matters is that sometimes the alert includes changes I previously marked as "ignored." That means I told the system not to alert me about those specific changes, but it does anyway.

My problem is not about the use case itself — it's about the system not respecting the ignore settings. When I get an alert, I should not see changes that I have already marked to be ignored.

dtrezubSV avatar Apr 23 '25 22:04 dtrezubSV

hmm no... there is a test for the global filters which works fine also

but looking in your data i can see

# diff *txt
167c167
< <link href="https://www.simplyvoting.com/wp-content/themes/my-little-big-theme-child/style2.css?v=1744887677" rel="stylesheet"/>
---
> <link href="https://www.simplyvoting.com/wp-content/themes/my-little-big-theme-child/style2.css?v=1744922889" rel="stylesheet"/>

the last two snapshots - the only difference was that ?v=...

This is what my bug report is about. Even if I explicitly told the system to ignore this line, it's still emitting an alert about that line.

dtrezubSV avatar Apr 23 '25 22:04 dtrezubSV

Another example: https://lemonade.changedetection.io/intriguingly-suffices/diff/4cae4acc-a55d-469a-8054-e7fee7180fae#text

Setting in Global Filters > Ignore Text: /\?v=\d/

The two only lines the alert has highlighted in green/red are lines containing ?v=

dtrezubSV avatar Apr 23 '25 23:04 dtrezubSV

Hmm so I increased the test to cover this situation and the test passes no problem..

So i'm wondering if its because of something else?

https://github.com/dgtlmoon/changedetection.io/blob/eb4cd35317ea0da16078efa4895b90840d3bd163/changedetectionio/tests/test_ignore_text.py#L262-L264

https://github.com/dgtlmoon/changedetection.io/blob/eb4cd35317ea0da16078efa4895b90840d3bd163/changedetectionio/tests/test_ignore_text.py#L171-L264

dgtlmoon avatar Apr 25 '25 16:04 dgtlmoon