-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
tell: fix edge case with @
as the tellee
#2582
Conversation
…spam error messages until the bot is restarted
I don't know how to add labels on github but easyfix would be appropriate here Thanks |
@bronzeguy I understand what this change does, but we need to be able to reproduce the bug as part of our review process. Some information we need:
I am unable to reproduce the bug as you've described it using either the current tip of development or the last stable version (v7.1.9). |
My apologies I forgot to include this information earlier.
This occurs on the latest version of Master branch [6a25d17] on the latest
version of Python shipped in Debian stable which is 3.11.2.
In order to reproduce the bug simply send a message using .tell where the
recipient is a single @. For example .tell @ a
It will send a message in the channel you are on where it says there was an
out of index range error.
Please let me know if there are any other issues
…On Sun, Dec 10, 2023, 7:43 PM James ***@***.***> wrote:
@bronzeguy <https://github.com/bronzeguy> I understand what this change
does, but we need to be able to reproduce the bug as part of our review
process.
Some information we need:
- What version of Sopel and Python is this?
- What steps are necessary to reproduce the bug?
- What errors do you see?
I am unable to reproduce the bug as you've described it using either the
current tip of development or the last stable version (v7.1.9).
—
Reply to this email directly, view it on GitHub
<#2582 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEDIA2GINTZEY2LZUUVI4RTYIZQMXAVCNFSM6AAAAABAO7276SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGE4TMOBVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Adding on to the error message it will continue to send this error message
for every message recieved
…On Sun, Dec 10, 2023, 8:02 PM HikingSnow ***@***.***> wrote:
My apologies I forgot to include this information earlier.
This occurs on the latest version of Master branch [6a25d17] on the latest
version of Python shipped in Debian stable which is 3.11.2.
In order to reproduce the bug simply send a message using .tell where the
recipient is a single @. For example .tell @ a
It will send a message in the channel you are on where it says there was
an out of index range error.
Please let me know if there are any other issues
On Sun, Dec 10, 2023, 7:43 PM James ***@***.***> wrote:
> @bronzeguy <https://github.com/bronzeguy> I understand what this change
> does, but we need to be able to reproduce the bug as part of our review
> process.
>
> Some information we need:
>
> - What version of Sopel and Python is this?
> - What steps are necessary to reproduce the bug?
> - What errors do you see?
>
> I am unable to reproduce the bug as you've described it using either the
> current tip of development or the last stable version (v7.1.9).
>
> —
> Reply to this email directly, view it on GitHub
> <#2582 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BEDIA2GINTZEY2LZUUVI4RTYIZQMXAVCNFSM6AAAAABAO7276SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGE4TMOBVHE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Please share the complete error report. We still cannot reproduce this issue with Python 3.11 on the current master (6a25d17). |
@bronzeguy Logs would help a lot. As it stands, we're unable to reproduce this on the same Python version and git commit. |
Hello, here are some logs from a channel and the bot itself. I am still able to reproduce this issue. SOPEL: https://pastebin.com/mQSDB1wE
IRC: https://pastebin.com/HrdXpKvJ
Please let me know if there are any other issues |
Apologies for the last message with giant code snippet I do not know how to put it in properly on github, I have put snippets in a pastebins |
@
as the tellee
Thanks, we were able to reproduce. Turns out there was an issue on our end. @dgw the patch here seems to fix the specific issue in question, but I think the more general solution might be to use Edit: I'm thinking here about the case where the tellee is |
Ah, we've discovered the dangers of allowing custom code to override builtins: @SnoopJ and I were at first testing a bot that had a custom @SnoopJ The The best way to fix this would be if Your idea about using
I extracted the relevant parts and included them here. Use triple-backticks (```) around multi-line code snippets. @bronzeguy Please look at the contributing guidelines in preparation for amending the patch. In particular, we'll want the commit message to match the style convention (see edited PR title for example) before it can be merged. |
@bronzeguy Before you just amend for commit message style only, here's an idea: Add Line 184 in 6a25d17
|
Fix an edge case which allowed a user to put in an invalid tellee name which in turn would case the bot to spam index out of range error messages until Sopel was restarted.
After discussion with @dgw on IRC, I've filed an alternative patch as #2584 (and added @bronzeguy as a co-author there). Thanks! |
@bronzeguy We'll treat this PR as more or less an "issue" that will be fixed by #2584. We appreciate the bug report! Plus as @SnoopJ said, you'll get co-author credit on the new patch that builds on what you started here. @SnoopJ Thanks for distilling this discussion into a PR that fixes the bug & simplifies the existing code, plus the follow-up issue. |
Description
There's an annoying bug where an oversight in code that checks if a message is prepended with an @ allows for a user to make the bot spit out error messages forever until the bot is restarted. I have fixed this oversight here
Checklist
make qa
(runsmake lint
andmake test
)