Skip to content

Conversation

50-scratch-tabs
Copy link
Contributor

I made report_comment use _assert_auth instead of _assert_permission so that you can report comments if you're not the profile owner.

I haven't tested this yet. I will test it next time I see spammers on griffpatch's profile. Additionally, due to this bug, it seems like the report function has never been tested, so I'll compare the network output to that when I do it in browser.

I made report_comment use _assert_auth instead of _assert_permission so that you can report comments if you're not the profile owner.

Signed-off-by: 50-scratch-tabs <197407676+50-scratch-tabs@users.noreply.github.com>
@FAReTek1
Copy link
Collaborator

FAReTek1 commented Feb 3, 2025

one of the main problems with the report api is that it is dangerous to test. i did see some ad spam earlier though, so that could be tested on

@50-scratch-tabs
Copy link
Contributor Author

one of the main problems with the report api is that it is dangerous to test. i did see some ad spam earlier though, so that could be tested on

Yes, I plan to test when I find spam. Keep an eye on griffpatch's profile once it opens back up.

@FAReTek1
Copy link
Collaborator

FAReTek1 commented Feb 4, 2025

heres an example of a reportable comment:
https://scratch.mit.edu/users/insanetaco2000/#comments-366138176 (advertising, this was sent on tons of profiles, including mine (i deleted it))

@TheCommCraft
Copy link
Collaborator

Is this good to merge?

@FAReTek1
Copy link
Collaborator

FAReTek1 commented Feb 26, 2025

has it been tested?

@50-scratch-tabs
Copy link
Contributor Author

Tested with the spam comment linked earlier. If it gets removed we'll know it worked.

@TheCommCraft
Copy link
Collaborator

TheCommCraft commented Feb 27, 2025 via email

@50-scratch-tabs
Copy link
Contributor Author

Tested with 3 accts, got removed instantly. Here's my quick and dirty code that I just ran in the shell:

>>> accts=[["Username1","password1"],["Username2","password2"],["Username3","password3"]]

>>> for i in accts:
...   i.append(scratchattach.login(i[0],i[1]))

>>> contenttoreport="5406 please play my anime video edit (i made video edit on scratch): https://scratch.mit.edu/projects/645577765/"

>>> for j in accts:
...   comment=j[2].connect_user("insanetaco2000").comments()[2] # change to user and comment number you want to report
...   if comment.content==contenttoreport:
...     comment.report()

Worked like a charm.

@TheCommCraft
Copy link
Collaborator

So did you try it with or without this PRs code?

@50-scratch-tabs
Copy link
Contributor Author

So did you try it with or without this PRs code?

With. Without it just raises an exception unless it's your own profile.

@TheCommCraft TheCommCraft merged commit 4d82cbf into TimMcCool:main Feb 28, 2025
@50-scratch-tabs 50-scratch-tabs deleted the patch-1 branch February 28, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants