-
-
Couldn't load subscription status.
- Fork 101
Forbid posting blacklisted files #542
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
Forbid posting blacklisted files #542
Conversation
…acklisted file extensions
application/src/main/java/org/togetherjava/tjbot/commands/Features.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
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.
Could u please improve ur PR description and also add some screenshots of all the dialogs please? Thanks
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/togetherjava/tjbot/commands/moderation/attachment/AttachmentListener.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/config/Config.java
Outdated
Show resolved
Hide resolved
|
I would expand the list to all or almost all common widows executables. You can find many lists online, this was the first hit for me: https://www.howtogeek.com/137270/50-file-extensions-that-are-potentially-dangerous-on-windows/
There are a bunch of executables for linux/mac, but viruses for these are basically nonexistent, since it's very hard to do anything without necessary permissions. For example, you can't even run an executable without giving it explicit execute permission. So I think it's safe to ignore those two for now.
|
updated the list for windows file extensions |
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
sure i posted the 2 scenarios with the listener 😄 |
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
|
remove the |
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Outdated
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
...ava/org/togetherjava/tjbot/commands/moderation/attachment/BlacklistedAttachmentListener.java
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/config/Config.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/config/Config.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/config/Config.java
Outdated
Show resolved
Hide resolved
|
auto merging this on the weekend if no approves come in sooner 👍 |
|
actually, lets just go |
Mhm yes thanks |
|
I would expand the list to all or almost all common widows executables. You can find many lists online, this was the first hit for me: https://www.howtogeek.com/137270/50-file-extensions-that-are-potentially-dangerous-on-windows/
There are a bunch of executables for linux/mac, but viruses for these are basically nonexistent, since it's very hard to do anything without necessary permissions. For example, you can't even run an executable without giving it explicit execute permission. So I think it's safe to ignore those two for now.
…---- On Sat, 27 Aug 2022 17:25:53 +0200 Mom0aut ***@***.***> wrote ---
Close #484
The config was slightly changed, the following was added:
Config
The config was slightly changed, the following was added:
"blacklistedFileExtension": "memes"
You can view, comment on, or merge this pull request online at:
#542
Commit Summary
141d7f0 added AttachmentListener checks if the message attachment contains blacklisted file extensions
File Changes
(https://github.com/Together-Java/TJ-Bot/pull/542/files)
M https://github.com/Together-Java/TJ-Bot/pull/542/files#diff-d3cb91974a7018defe0e196080ec8b2f1b84f41f3f721cf342cbd1e447979044 (6)
M https://github.com/Together-Java/TJ-Bot/pull/542/files#diff-bbb936fdbe5b13be4e475be331c0eb388b91d272edefde3eadd9b0f05bcb0374 (7)
A https://github.com/Together-Java/TJ-Bot/pull/542/files#diff-5622eb60ab6e2791703abee0922301ef3832fd318b90ff1f472910b3de44b417 (126)
M https://github.com/Together-Java/TJ-Bot/pull/542/files#diff-0ce547862f0b6a4f2c9ce5b51c2ea5f58cf909e207b5ebfe19f92ddd5e7f1101 (17)
Patch Links:
https://github.com/Together-Java/TJ-Bot/pull/542.patch
https://github.com/Together-Java/TJ-Bot/pull/542.diff
—
Reply to this email directly, #542, or https://github.com/notifications/unsubscribe-auth/AHL6YWJMPDWIETFKCPQYKJ3V3IXQDANCNFSM57ZPPTDA.
You are receiving this because your review was requested.
|
|
arent these already in the list? note that we kept some out to not hinder UX (jar, pdf) |
Close #484
Added
BlacklistedAttachmentListenerwhich delete any blacklisted file attachment. The listener sent a dm to the user and informs the Mods.Scenario message with blacklisted file extension:
Posting message
User message was deleted
Response from listener
Message to the Mods
Scenario message without blacklisted file extension:
Posting message
Message wont be deleted
No blacklisted file extension found therefore no deletion 😄
Config
The config was slightly changed, the following was added: