Feature implementation from commits e59b167..a05a55d#1
Open
yashuatla wants to merge 18 commits intofeature-base-1from
Open
Feature implementation from commits e59b167..a05a55d#1yashuatla wants to merge 18 commits intofeature-base-1from
yashuatla wants to merge 18 commits intofeature-base-1from
Conversation
…us.Writer() that could be triggered by logging text longer than 64kb without newlines. Previously, the bufio.Scanner used by Writer() would hang indefinitely when reading such text without newlines, causing the application to become unresponsive.
This commit fixes a potential denial of service vulnerability in logrus.Writer() that could be triggered by logging text longer than 64KB without newlines. Previously, the bufio.Scanner used by Writer() would hang indefinitely when reading such text without newlines, causing the application to become unresponsive.
Scan text in 64KB chunks
This commit fixes a potential denial of service vulnerability in logrus.Writer() that could be triggered by logging text longer than 64kb without newlines.
Use text when shows the logrus output
This reverts commit 352781d.
Commit 766cfec introduced this bug by defining an incorrect split function. First it breaks the old behavior because it never splits at newlines now. Second, it causes a panic because it never tells the scanner to stop. See the bufio.ScanLines function, something like: ``` if atEOF && len(data) == 0 { return 0, nil, nil } ``` is needed to do that. This commit fixes it by restoring the old behavior and calling bufio.ScanLines but also keep the 64KB check in place to avoid buffering for to long. Two tests are added to ensure it is working as expected. Fixes sirupsen#1383 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Fix building when the new `wasip1` port is being used. This is a new target that will be introduced by go 1.21. For more details golang/go#58141 Signed-off-by: Flavio Castelli <fcastelli@suse.com>
…ticcheck-issues
Support GNU/Hurd
Enable building using the tinygo compiler, together with the `wasi` target. This combination requires different handling compared to go >= 1.21 and the `wasip1` target. That's because Tinygo compiles using the GOOS set to `linux` and the `GOARCH` set to `wasi`. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
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.
PR Summary
Code Improvements and Extended OS Support for Logrus Package
Overview
This PR makes minor code improvements to the Logrus package and extends OS support by adding "hurd" to the build constraint tags.
Change Types
Affected Modules
logrus_test.goterminal_check_bsd.gowriter_test.go