matrix-org / mjolnir

A moderation tool for Matrix
Apache License 2.0
310 stars 53 forks source link

Nonstop Abuse report #406

Open mackiexx opened 1 year ago

mackiexx commented 1 year ago

Mjolnir keeps sending same abuse report even after i've attended to it. it ought to stop as soon as an action is given.

Yoric commented 1 year ago

@mackiexx How is it configured? With the reverse proxy or with polling?

mackiexx commented 1 year ago

@mackiexx How is it configured? With the reverse proxy or with polling?

I don't even know what is polling.

i followed the instruction on READMD here and then i followed exactly what is on the installation page below .

git clone https://github.com/matrix-org/mjolnir.git cd mjolnir yarn install yarn build node lib/index.js

Then i copied this exact code below and added to my nginx file for reverse proxy.

` location ~ ^/_matrix/client/(r0|v3)/rooms/([^/])/report/(.)$ {

  add_header 'Access-Control-Allow-Origin' '*' always; 
  add_header 'Access-Control-Allow-Credentials' 'true' always;
  add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
  add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since' always;
  add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
  add_header 'Access-Control-Max-Age' 1728000; # cache preflight value for 20 days

  # Alias the regexps, to ensure that they're not rewritten.
  set $room_id $2;
  set $event_id $3;
  proxy_pass http://127.0.0.1:8082/api/1/report/$room_id/$event_id;
}`

I also noticed along with this, Mjolnir doesn't work with Pantalaimon even though i have installed it and i don't know if it has to do with wrong configuration.

mackiexx commented 1 year ago

@mackiexx How is it configured? With the reverse proxy or with polling?

To add, my mjolnir configuration looks like this

web:
  enabled: true

  port: 8082

  address: localhost

  abuseReporting:
    enabled: true

pollReports: true

displayReports: true

edit (Yoric) Edited layout to better understand the configuration file.

Yoric commented 1 year ago

Mjölnir has two ways to fetch and display reports:

  1. The reverse proxy (which you enabled with nginx, as above), which is the "best" way to display reports.
  2. The polling (which you enabled with pollReports), which is designed as a fallback for people who cannot setup a reverse proxy for any reason, and displays fewer details about reports.

You seem to have both configured, so it will display reports twice. Does this match your experience? Or does it display reports more than twice?

mackiexx commented 1 year ago

Mjölnir has two ways to fetch and display reports:

  1. The reverse proxy (which you enabled with nginx, as above), which is the "best" way to display reports.
  2. The polling (which you enabled with pollReports), which is designed as a fallback for people who cannot setup a reverse proxy for any reason, and displays fewer details about reports.

You seem to have both configured, so it will display reports twice. Does this match your experience? Or does it display reports more than twice?

Yes, it displays more than twice even. Example: when you get a notification on your phone or say you have your phone ring out and you picked it up and silenced it, or even ignored the call, you took action with that and it is not suppose to ring again unless the person calls you back right? I tested by reporting an account, and the bot reported it to me so I took action and clicked the button “ignore the bad report”, the bot responded affirmative. Then within 2 seconds, same report is coming in again, over and over again.

mackiexx commented 1 year ago

Mjölnir has two ways to fetch and display reports:

  1. The reverse proxy (which you enabled with nginx, as above), which is the "best" way to display reports.
  2. The polling (which you enabled with pollReports), which is designed as a fallback for people who cannot setup a reverse proxy for any reason, and displays fewer details about reports.

You seem to have both configured, so it will display reports twice. Does this match your experience? Or does it display reports more than twice?

For some reason, when i disabled poll reports, reporting a user doesn't show in the room again and i'm wondering if my reverse proxy is set up correctly

Yoric commented 1 year ago

So it feels like there is a problem with polling that somehow reports stuff more than once? I'll investigate that.

Yoric commented 1 year ago

Oh... we seem to be forgetting to store from! Definitely a bug!

My bad, we do store it.

mackiexx commented 1 year ago

~Oh... we seem to be forgetting to store from! Definitely a bug!~

My bad, we do store it.

Did you manage to find anything?

ThoreKr commented 1 year ago

IIm observing the same behaviour with admin api polling. Every minute it will post all reports over and over again.

Pecadis commented 9 months ago

Hi, just wanted to join the conversation as i am facing the same issue even after a year. @Yoric did you manage to find something in this regard?

paddatrapper commented 7 months ago

Chiming in on this - we are seeing the same thing with our Mjolnir instance. It keeps displaying reports again and again, even if we deal with them (via reactions and confirmation reactions). We are also using polling