Skip to content

Feature implementation from commits e59b167..a05a55d#1

Open
yashuatla wants to merge 18 commits intofeature-base-1from
feature-head-1
Open

Feature implementation from commits e59b167..a05a55d#1
yashuatla wants to merge 18 commits intofeature-base-1from
feature-head-1

Conversation

@yashuatla
Copy link
Copy Markdown
Owner

@yashuatla yashuatla commented Jun 25, 2025

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

Type Description
Enhancement Extended OS support by adding "hurd" to build constraints
Refactor Simplified variable declaration in test code
Test Added import statements to writer test file

Affected Modules

Module / File Change Description
logrus_test.go Simplified variable declaration in TestLevelString function
terminal_check_bsd.go Added "hurd" to build constraint tags for extended OS support
writer_test.go Added import statements for test dependencies

xieyuschen and others added 18 commits June 16, 2022 15:49
…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.
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 6acd903, reversing
changes made to e59b167.
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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants