Skip to content

Commit

Permalink
Merge pull request #2039 from ergochat/dosfix
Browse files Browse the repository at this point in the history
pointfix for websocket client DoS
  • Loading branch information
slingamn committed Jan 22, 2023
2 parents 1e1acda + ca03a42 commit f69b339
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
All notable changes to Ergo will be documented in this file.

## [2.11.1] - 2022-01-22

Ergo 2.11.1 is a bugfix release, fixing a denial-of-service issue in our websocket implementation. We regret the oversight.

This release includes no changes to the config file format or database file format.

### Security
* Fixed a denial-of-service issue affecting websocket clients (#2039)

## [2.11.0] - 2022-12-25

We're pleased to be publishing v2.11.0, a new stable release. This is another bugfix release aimed at improving client compatibility and keeping up with the IRCv3 specification process.
Expand Down
4 changes: 2 additions & 2 deletions irc/ircconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ func (wc IRCWSConn) WriteLines(buffers [][]byte) (err error) {
}

func (wc IRCWSConn) ReadLine() (line []byte, err error) {
messageType, line, err := wc.conn.ReadMessage()
_, line, err = wc.conn.ReadMessage()
if err == nil {
if messageType == websocket.BinaryMessage && !utf8.Valid(line) {
if !utf8.Valid(line) {
return line, errInvalidUtf8
}
return line, nil
Expand Down
2 changes: 1 addition & 1 deletion irc/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "fmt"

const (
// SemVer is the semantic version of Ergo.
SemVer = "2.11.0"
SemVer = "2.11.1"
)

var (
Expand Down

0 comments on commit f69b339

Please sign in to comment.