-
Notifications
You must be signed in to change notification settings - Fork 345
[ENG-7873] CLONE - SPAM - When Hamming a Spammed user, preprints and registrations remain private #11125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENG-7873] CLONE - SPAM - When Hamming a Spammed user, preprints and registrations remain private #11125
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is a tricky one. Could you add a test that:
- Spams a public project
- Hams the project to make it public
- Make the project private
- Spam the private project
- Ham the project
The project should be private when that's all done.
Note that logging the privacy change is crucial in this context.
There are some suspicious places where the privacy log is not created:
These seem like edge cases, so I left them untouched as I don't know whether this behavior is expected |
@antkryt So the spam system doesn't set a flag when the object is spammed to say whether it was public before the spamming happened or not? It's all just relying on logs? |
@brianjgeiger correct. It was proposed and implemented in this ticket to fix multiple spam scenario. Some alternatives:
We can implement |
@antkryt Okay, I've been chatting with Product on the Jira ticket, and we're going to make this so that, regardless of logs or whatever, if a preprint is not in |
@brianjgeiger what about registrations and projects? |
@antkryt Projects we'll continue to do the way we are. We might do registrations similarly to preprints, but there are more states and it's not as urgent, so let's leave registrations for the moment and revisit that if necessary later. |
cbff71f
into
CenterForOpenScience:feature/pbs-25-10
…cience/osf.io into refactor-notifications * 'feature/pbs-25-10' of https://github.com/CenterForOpenScience/osf.io: fix issue where trying another already confirmed email threw an uncaught exception (CenterForOpenScience#11161) [ENG-8148] Add ArtifactOutcome in annotations to linked nodes (CenterForOpenScience#11158) [ENG-7966] Add "collected-in" relationship for Nodes (CenterForOpenScience#11140) fix issue where not having any external identities caused a 500 [ENG-7965] Add v2 email token confirmation endpoints (CenterForOpenScience#11139) [ENG-8052] Fixed FilterMixin issue with multiple values of notification subscription field (CenterForOpenScience#11150) support related_counts for view_only links (CenterForOpenScience#11148) allow admins change registration providers (CenterForOpenScience#11145) [ENG-7927] Improved logging for embargo termination (CenterForOpenScience#11137) [ENG-7873] CLONE - SPAM - When Hamming a Spammed user, preprints and registrations remain private (CenterForOpenScience#11125) Update changelog and package.json fix TypeError when check stucked registration revert async email sending (CenterForOpenScience#11134) [ENG-7921] Add scopes for applications to full_read and full_write scopes (CenterForOpenScience#11126) # Conflicts: # api_tests/nodes/views/test_node_detail.py # api_tests/nodes/views/test_node_linked_registrations.py # framework/auth/oauth_scopes.py # tests/test_registrations/test_retractions.py
…registrations remain private (CenterForOpenScience#11125) ## Purpose fix was_public state when flag spam ## Changes - correct check if node was public when flag_spam - use earliest confirm/flag spam log to check if node was public instead of the latest one --- - fix TypeError when check archiving status for stuck registrations (not related to ticket ENG-7873, but it's just one line `permissible_addons = set(permissible_addons)`, so no additional testing is required) ## QA Notes I couldn't reproduce this issue via UI, but combination `confirm_spam()` -> `flag_spam()` -> `...` breaks this feature. I'm not sure if it's exactly what's happening in our case, but since `flag_spam()` is used with automatic spam checks during node/preprint updates, it's quite possible. ## Ticket https://openscience.atlassian.net/browse/ENG-7873
Purpose
fix was_public state when flag spam
Changes
permissible_addons = set(permissible_addons)
, so no additional testing is required)QA Notes
I couldn't reproduce this issue via UI, but combination
confirm_spam()
->flag_spam()
->...
breaks this feature. I'm not sure if it's exactly what's happening in our case, but sinceflag_spam()
is used with automatic spam checks during node/preprint updates, it's quite possible.Documentation
Side Effects
Ticket
https://openscience.atlassian.net/browse/ENG-7873