Skip to content
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

Unblock of a blocked GtS account from another instance receives a 403 forbidden #245

Closed
tsmethurst opened this issue Sep 23, 2021 · 0 comments · Fixed by #247
Closed

Unblock of a blocked GtS account from another instance receives a 403 forbidden #245

tsmethurst opened this issue Sep 23, 2021 · 0 comments · Fixed by #247
Labels
bug Something isn't working federation Issue relates to S2S/federation

Comments

@tsmethurst
Copy link
Contributor

tsmethurst commented Sep 23, 2021

Essentially, the unblock activity is being refused, because of the existing block.

To reproduce: block a gotosocial account from another instance. Then unblock it. The block will go through but the unblock will produce a 403.

We should add an exception where 'undo' activity on a block skips through the block checking logic, otherwise a blocked user can never be unblocked again.

logs:

time="2021-09-23T12:24:56Z" level="debug" msg="entering BLOCKED function with IRI list: [https://ondergrond.org/users/dumpsterqueer]" func="github.com/superseriousbusiness/gotosocial/internal/federation.(*federator).Blocked" file="github.com/superseriousbusiness/gotosocial/internal/federation/federatingprotocol.go:183" fields.func="Blocked" func="github.com/superseriousbusiness/gotosocial/internal/federation.(*federator).Blocked"
time="2021-09-23T12:24:56Z" level="trace" msg="SELECT count(*) FROM \"domain_blocks\" AS \"domain_block\" WHERE (LOWER(domain) = LOWER('ondergrond.org'))" func="github.com/superseriousbusiness/gotosocial/internal/db/bundb.(*debugQueryHook).AfterQuery" file="github.com/superseriousbusiness/gotosocial/internal/db/bundb/trace.go:52" operation="SELECT" queryTime="1.454ms"
time="2021-09-23T12:24:56Z" level="trace" msg="SELECT count(*) FROM \"blocks\" AS \"block\" WHERE (account_id = '01JNN207W98SGG3CBJ76R5MVDN') AND (target_account_id = '00ZM91JAGCPDQVDW6XS71BYP59') OR (target_account_id = '01JNN207W98SGG3CBJ76R5MVDN') AND (account_id = '00ZM91JAGCPDQVDW6XS71BYP59')" func="github.com/superseriousbusiness/gotosocial/internal/db/bundb.(*debugQueryHook).AfterQuery" file="github.com/superseriousbusiness/gotosocial/internal/db/bundb/trace.go:52" operation="SELECT" queryTime="766µs"
time="2021-09-23T12:24:56Z" level="info" msg="Forbidden: wrote -1 bytes in 28.81653ms" func="github.com/superseriousbusiness/gotosocial/internal/router.loggerWithConfig.func1" file="github.com/superseriousbusiness/gotosocial/internal/router/logger.go:65" clientIP="192.119.111.147" latency="28.81653ms" method="POST" path="/users/dumpsterqueer/inbox" statusCode="403" userAgent="http.rb/4.4.1 (Mastodon/3.3.0; +https://ondergrond.org/)"

@tsmethurst tsmethurst added bug Something isn't working federation Issue relates to S2S/federation labels Sep 23, 2021
@tsmethurst tsmethurst mentioned this issue Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working federation Issue relates to S2S/federation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant