Commit Graph

1241 Commits

Author SHA1 Message Date
Simon Eskildsen 104b8b0048
Merge pull request #1390 from ashmckenzie/ashmckenzie/fix-staticcheck-issues 2023-06-03 16:46:05 -04:00
Ash McKenzie 80d649c2d1
Fix go-staticcheck S1021 issues 2023-06-03 13:34:35 +10:00
Ash McKenzie 2f72d325dc
Fix go-staticcheck SA1029 issues 2023-06-03 13:34:35 +10:00
Paul Holzinger d40e25cd45 fix panic in Writer
Commit 766cfece 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 #1383

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-05-21 08:59:35 -04:00
Simon Eskildsen f9291a534c Revert "Revert "Merge pull request #1376 from ozfive/master""
This reverts commit 352781de90.
2023-05-21 08:59:03 -04:00
Simon Eskildsen 352781de90 Revert "Merge pull request #1376 from ozfive/master"
This reverts commit 6acd903758, reversing
changes made to e59b167d75.
2023-05-17 13:59:50 -04:00
Simon Eskildsen b30aa27cf4
Merge pull request #1339 from xieyuschen/patch-1
Use text when shows the logrus output
2023-05-15 06:31:28 -04:00
Simon Eskildsen 6acd903758
Merge pull request #1376 from ozfive/master
This commit fixes a potential denial of service vulnerability in logrus.Writer() that could be triggered by logging text longer than 64kb without newlines.
2023-05-15 06:31:06 -04:00
Christopher Straight 105e63f86c
Merge pull request #1 from ashmckenzie/ashmckenzie/fix-writer-scanner
Scan text in 64KB chunks
2023-05-03 19:19:17 -07:00
Chris c052ba6a07
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. Previously, the bufio.Scanner
used by Writer() would hang indefinitely when
reading such text without newlines, causing the
application to become unresponsive.
2023-05-04 12:10:48 +10:00
Simon Eskildsen e59b167d75
Merge pull request #1372 from tommyblue/syslog_different_loglevels 2023-03-11 21:21:49 -03:00
Chris 766cfece37 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. 2023-03-10 13:45:41 -08:00
Tommaso Visconti 70234da9c3 Add instructions to use different log levels for local and syslog
This commit adds instructions to the syslog readme about how to
send different log levels to local logging (`log.SetLevel`) and
syslog hook.

fixes #1369
2023-02-17 10:10:23 +01:00
Simon Eskildsen a448f8228b
Merge pull request #1362 from FrancoisWagner/fix-data-race-in-hooks-test-pkg
Fix data race in hooks.test package
2023-01-07 17:04:39 -05:00
Francois ff07b25fdf Fix data race in hooks.test package 2022-12-22 10:58:30 +01:00
David Bariod f8bf7650dc
Merge pull request #1343 from sirupsen/dbd-upd-dep
update dependencies
2022-07-19 09:08:54 +02:00
David Bariod ebc9029252 update dependencies 2022-07-19 08:45:10 +02:00
Griffin Abner d8787af86c
Use text when shows the logrus output 2022-06-16 15:49:56 +08:00
Simon Eskildsen 56c843c73d
Merge pull request #1337 from izhakmo/fix-cve
update gopkg.in/yaml.v3 to v3.0.1
2022-06-13 07:17:07 -04:00
izhakmo 41b4ee686d update gopkg.in/yaml.v3 to v3.0.1 2022-06-06 18:41:45 +03:00
David Bariod f98ed3eb76
Merge pull request #1333 from nathanejohnson/bumpxsys
bump version of golang.org/x/sys dependency
2022-06-06 06:16:01 +02:00
Nathan Johnson 2b8f60a012 bump version of golangci-lint 2022-06-02 09:52:03 -05:00
Nathan Johnson 0db10ef84a bump version of golang.org/x/sys dependency
fixes #1332
2022-06-01 20:17:29 -05:00
Simon Eskildsen 85981c0459
Merge pull request #1263 from rubensayshi/fix-race 2022-01-12 18:45:10 -05:00
David Bariod 79c5ab66aa
Merge pull request #1283 from sirupsen/dbd-log-doc
Improve Log methods documentation
2021-09-12 16:09:16 +02:00
David Bariod 5f8c666a13 Improve Log methods documentation 2021-09-12 16:03:49 +02:00
David Bariod 5418b6e7a4
Merge pull request #1282 from sirupsen/dbd-ci-no-cross
reduce the list of cross build target
2021-09-12 16:02:09 +02:00
David Bariod 25e89b7d23 do not run the linter on windows 2021-09-12 15:59:08 +02:00
David Bariod f25cd754cf remove duplicated build constraints line 2021-09-12 15:58:50 +02:00
David Bariod 51f2599bdd reduce the list of cross build target 2021-09-12 15:52:09 +02:00
David Bariod accc7da667
Merge pull request #1277 from anajavi/patch-1
ci: add go 1.17 to test matrix
2021-09-12 08:16:54 +02:00
anajavi 0926db15e5
ci: run only on go 1.17 2021-09-12 08:49:26 +03:00
David Bariod 22d63b740b
Merge pull request #1281 from sirupsen/dbd-auto-stale-issues
indicates issues as stale automatically
2021-09-11 15:01:29 +02:00
David Bariod 526e535580 indicates issues as stale automatically 2021-09-11 15:00:32 +02:00
David Bariod b53d94c8ad
Merge pull request #1266 from runphp/patch-1
Update README.md
2021-09-11 14:47:43 +02:00
David Bariod de2d2027ff
Merge pull request #1280 from sirupsen/bug-1275
bump golang.org/x/sys depency version
2021-09-11 14:20:32 +02:00
David Bariod dff9872c76 bump golang.org/x/sys depency version 2021-09-11 14:09:47 +02:00
anajavi 15b98b1d72
ci: add go 1.17 to test matrix 2021-09-02 13:45:20 +03:00
heui f5f6a033d3
Update README.md 2021-06-24 09:52:04 +08:00
Ruben de Vries 78f838918d
fix race condition for SetFormatter and properly fix SetReportCaller race as well 2021-06-16 11:57:31 +02:00
David Bariod b50299cfaa
Merge pull request #1253 from edoger/buffer-pool
Add support for the logger private buffer pool.
2021-04-22 15:34:36 +02:00
Qingshan Luo 1818363d79 Add support for the logger private buffer pool. 2021-04-20 10:48:30 +08:00
David Bariod fdf1618bf7
Merge pull request #1249 from injustease/docs/badge
Change godoc badge to pkg.go.dev badge
2021-03-18 10:57:23 +01:00
Billy Zaelani Malik b1c1cea8f6 Change godoc badge to pkg.go.dev badge 2021-03-18 08:53:31 +07:00
David Bariod bde44a27f3
Merge pull request #1246 from thaJeztah/bump_testify
go.mod: github.com/stretchr/testify v1.7.0
2021-03-12 16:18:03 +01:00
Sebastiaan van Stijn 9b555f4fd7
go.mod: github.com/stretchr/testify v1.7.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 15:51:52 +01:00
David Bariod fe9e9fcbba
Merge pull request #1239 from thaJeztah/move_to_gha
CI: use GitHub Actions
2021-03-09 13:46:41 +01:00
David Bariod bdc0db8ead
Merge pull request #1244 from sirupsen/dbd-release
update changelog
2021-03-09 11:28:17 +01:00
David Bariod 1bfef4b986 update changelog 2021-03-09 11:27:33 +01:00
David Bariod 7a997b9285 improve documentation about timestamp format 2021-03-08 18:02:30 +01:00