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

Make instances block more lenient #9258

Closed
tamaina opened this issue Dec 3, 2022 · 4 comments · Fixed by #9263
Closed

Make instances block more lenient #9258

tamaina opened this issue Dec 3, 2022 · 4 comments · Fixed by #9263
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR

Comments

@tamaina
Copy link
Contributor

tamaina commented Dec 3, 2022

Summary

インスタンスブロック(blockedHosts)の検査をもう少し広範にする
現状、インスタンスブロック設定はblockedHosts.includes(targetHost)のように検査されており、ワイルドカード等には非対応で等しいものしかブロックできない。

blockedHosts.someでendsWithとかincludesなどで検査するようにしたい。

@tamaina tamaina added ✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR labels Dec 3, 2022
@tamaina
Copy link
Contributor Author

tamaina commented Dec 3, 2022

mastodon/mastodon#11558

MastodonはendsWithっぽい

@tamaina
Copy link
Contributor Author

tamaina commented Dec 3, 2022

SQLのWhereでNOT blockedHosts.some(x => x.endsWith(targetHost))ってどうやって表現するんだろう

@tamaina
Copy link
Contributor Author

tamaina commented Dec 3, 2022

@tamaina
Copy link
Contributor Author

tamaina commented Dec 3, 2022

https://akkoma.dev/FoundKeyGang/FoundKey/pulls/269/files

FoundKey、RegExp(ワイルドカード)やめるらしいぜ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨Feature This adds/improves/enhances a feature packages/backend Server side specific issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant