Fixes server crash in chathistory limit parameter#2248
Closed
prdes wants to merge 1 commit intoergochat:masterfrom
Closed
Fixes server crash in chathistory limit parameter#2248prdes wants to merge 1 commit intoergochat:masterfrom
prdes wants to merge 1 commit intoergochat:masterfrom
Conversation
When one provides a limit of -1 the prealloc gets this limit value, which is an invalid input to provide to make() Signed-off-by: Pratyush Desai <pratyush.desai@liberta.casa>
Member
|
Thanks for reporting this. This does not crash the server; it produces a panic on the client's own goroutine, which is handled here: Lines 662 to 670 in 5bab190 so it causes the client to be disconnected. Since I think this can only be caused by a programming error, not triggered by another user's input, this is not a DoS. However, please be more careful in future: if you think you might have found a DoS, please contact me privately instead of opening a PR or issue. |
slingamn
added a commit
to slingamn/ergo
that referenced
this pull request
Apr 24, 2025
slingamn
added a commit
to slingamn/ergo
that referenced
this pull request
Apr 24, 2025
slingamn
added a commit
to slingamn/ergo
that referenced
this pull request
Apr 24, 2025
Member
|
Closing this in favor of #2249 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When one provides a limit of -1 the prealloc gets this limit value, which is an invalid input to provide to make()