From 34f11ddb97cf43ed1b7dc6c48d08dd7a444b1903 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 13 Jun 2019 02:17:21 -0400 Subject: [PATCH 01/23] implement draft/labeled-response-0.2 --- gencapdefs.py | 2 +- irc/caps/defs.go | 4 ++-- irc/responsebuffer.go | 20 ++++++++++++++------ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gencapdefs.py b/gencapdefs.py index 2daf59bd..0dab5b3e 100644 --- a/gencapdefs.py +++ b/gencapdefs.py @@ -77,7 +77,7 @@ CAPDEFS = [ ), CapDef( identifier="LabeledResponse", - name="draft/labeled-response", + name="draft/labeled-response-0.2", url="https://ircv3.net/specs/extensions/labeled-response.html", standard="draft IRCv3", ), diff --git a/irc/caps/defs.go b/irc/caps/defs.go index 6a691bbc..4092bb2f 100644 --- a/irc/caps/defs.go +++ b/irc/caps/defs.go @@ -53,7 +53,7 @@ const ( // https://ircv3.net/specs/extensions/invite-notify-3.2.html InviteNotify Capability = iota - // LabeledResponse is the draft IRCv3 capability named "draft/labeled-response": + // LabeledResponse is the draft IRCv3 capability named "draft/labeled-response-0.2": // https://ircv3.net/specs/extensions/labeled-response.html LabeledResponse Capability = iota @@ -135,7 +135,7 @@ var ( "echo-message", "extended-join", "invite-notify", - "draft/labeled-response", + "draft/labeled-response-0.2", "draft/languages", "oragono.io/maxline-2", "message-tags", diff --git a/irc/responsebuffer.go b/irc/responsebuffer.go index 794254c0..e651cd4a 100644 --- a/irc/responsebuffer.go +++ b/irc/responsebuffer.go @@ -212,16 +212,24 @@ func (rb *ResponseBuffer) flushInternal(final bool, blocking bool) error { } useLabel := rb.session.capabilities.Has(caps.LabeledResponse) && rb.Label != "" - // use a batch if we have a label, and we either currently have 0 or 2+ messages, + // use a batch if we have a label, and we either currently have 2+ messages, // or we are doing a Flush() and we have to assume that there will be more messages // in the future. - useBatch := useLabel && (len(rb.messages) != 1 || !final) + startBatch := useLabel && (1 < len(rb.messages) || !final) - // if label but no batch, add label to first message - if useLabel && !useBatch && len(rb.messages) == 1 && rb.batchID == "" { - rb.messages[0].SetTag(caps.LabelTagName, rb.Label) - } else if useBatch { + if startBatch { rb.sendBatchStart(blocking) + } else if useLabel && len(rb.messages) == 0 && rb.batchID == "" && final { + // ACK message + message := ircmsg.MakeMessage(nil, rb.session.client.server.name, "ACK") + message.SetTag(caps.LabelTagName, rb.Label) + if rb.session.capabilities.Has(caps.ServerTime) { + message.SetTag("time", time.Now().UTC().Format(IRCv3TimestampFormat)) + } + rb.session.SendRawMessage(message, blocking) + } else if useLabel && len(rb.messages) == 1 && rb.batchID == "" && final { + // single labeled message + rb.messages[0].SetTag(caps.LabelTagName, rb.Label) } // send each message out From 8dca545264c297b79ad9e8409aee64e1aa198aaf Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 13 Jun 2019 02:24:14 -0400 Subject: [PATCH 02/23] consolidate some time-setting code --- irc/client.go | 20 +++++++++++--------- irc/responsebuffer.go | 12 +++--------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/irc/client.go b/irc/client.go index 355876d8..b1c7fe6c 100644 --- a/irc/client.go +++ b/irc/client.go @@ -1160,12 +1160,7 @@ func (session *Session) sendFromClientInternal(blocking bool, serverTime time.Ti msg.SetTag("msgid", msgid) } // attach server-time - if session.capabilities.Has(caps.ServerTime) { - if serverTime.IsZero() { - serverTime = time.Now().UTC() - } - msg.SetTag("time", serverTime.Format(IRCv3TimestampFormat)) - } + session.setTimeTag(&msg, serverTime) return session.SendRawMessage(msg, blocking) } @@ -1246,12 +1241,19 @@ func (client *Client) Send(tags map[string]string, prefix string, command string func (session *Session) Send(tags map[string]string, prefix string, command string, params ...string) (err error) { msg := ircmsg.MakeMessage(tags, prefix, command, params...) - if session.capabilities.Has(caps.ServerTime) && !msg.HasTag("time") { - msg.SetTag("time", time.Now().UTC().Format(IRCv3TimestampFormat)) - } + session.setTimeTag(&msg, time.Time{}) return session.SendRawMessage(msg, false) } +func (session *Session) setTimeTag(msg *ircmsg.IrcMessage, serverTime time.Time) { + if session.capabilities.Has(caps.ServerTime) && !msg.HasTag("time") { + if serverTime.IsZero() { + serverTime = time.Now() + } + msg.SetTag("time", serverTime.UTC().Format(IRCv3TimestampFormat)) + } +} + // Notice sends the client a notice from the server. func (client *Client) Notice(text string) { client.Send(nil, client.server.name, "NOTICE", client.Nick(), text) diff --git a/irc/responsebuffer.go b/irc/responsebuffer.go index e651cd4a..9df090a0 100644 --- a/irc/responsebuffer.go +++ b/irc/responsebuffer.go @@ -93,9 +93,7 @@ func (rb *ResponseBuffer) AddFromClient(time time.Time, msgid string, fromNickMa msg.SetTag("msgid", msgid) } // attach server-time - if rb.session.capabilities.Has(caps.ServerTime) && !msg.HasTag("time") { - msg.SetTag("time", time.UTC().Format(IRCv3TimestampFormat)) - } + rb.session.setTimeTag(&msg, time) rb.AddMessage(msg) } @@ -223,9 +221,7 @@ func (rb *ResponseBuffer) flushInternal(final bool, blocking bool) error { // ACK message message := ircmsg.MakeMessage(nil, rb.session.client.server.name, "ACK") message.SetTag(caps.LabelTagName, rb.Label) - if rb.session.capabilities.Has(caps.ServerTime) { - message.SetTag("time", time.Now().UTC().Format(IRCv3TimestampFormat)) - } + rb.session.setTimeTag(&message, time.Time{}) rb.session.SendRawMessage(message, blocking) } else if useLabel && len(rb.messages) == 1 && rb.batchID == "" && final { // single labeled message @@ -235,9 +231,7 @@ func (rb *ResponseBuffer) flushInternal(final bool, blocking bool) error { // send each message out for _, message := range rb.messages { // attach server-time if needed - if rb.session.capabilities.Has(caps.ServerTime) && !message.HasTag("time") { - message.SetTag("time", time.Now().UTC().Format(IRCv3TimestampFormat)) - } + rb.session.setTimeTag(&message, time.Time{}) // attach batch ID, unless this message was part of a nested batch and is // already tagged From f17777995b0383432ff360690dceb6fb6bdb6c85 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 19 Jun 2019 04:53:15 -0400 Subject: [PATCH 03/23] add a new test --- irc/strings_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/irc/strings_test.go b/irc/strings_test.go index 595ef7f6..40d32f68 100644 --- a/irc/strings_test.go +++ b/irc/strings_test.go @@ -189,6 +189,10 @@ func TestSkeleton(t *testing.T) { t.Errorf("we must protect against cyrillic homoglyph attacks") } + if skeleton("еmily") != skeleton("emily") { + t.Errorf("we must protect against cyrillic homoglyph attacks") + } + if skeleton("РОТАТО") != "potato" { t.Errorf("we must protect against cyrillic homoglyph attacks") } From 6e9a31a574efb1669b0acc606222ef7a9a675f55 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 19 Jun 2019 04:56:11 -0400 Subject: [PATCH 04/23] use confusables.SkeletonTweaked to fix the test --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- irc/strings.go | 24 +----------------------- irc/strings_test.go | 12 ------------ vendor | 2 +- 5 files changed, 5 insertions(+), 39 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 73ab4a22..a7a47151 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -62,11 +62,11 @@ revision = "9520e82c474b0a04dd04f8a40959027271bab992" [[projects]] - digest = "1:7caf3ea977a13cd8b9a2e1ecef1ccaa8e38f831b4f6ffcb8bd0aa909c48afb3a" + digest = "1:940e48aff4b5fe62c3e6fd1245cc35271327a424b7ffbe4febfa83ff8f9c4f53" name = "github.com/oragono/confusables" packages = ["."] pruneopts = "UT" - revision = "d5dd03409482fae2457f0742be22782890f720c2" + revision = "e65e89839ad43b68dbea2d3ca62f0f1c594b029a" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index b4656ed4..ed8deed7 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -50,7 +50,7 @@ name = "github.com/oragono/go-ident" [[constraint]] - revision = "d5dd03409482fae2457f0742be22782890f720c2" + revision = "e65e89839ad43b68dbea2d3ca62f0f1c594b029a" name = "github.com/oragono/confusables" [[constraint]] diff --git a/irc/strings.go b/irc/strings.go index be671164..d0bbf8b1 100644 --- a/irc/strings.go +++ b/irc/strings.go @@ -108,26 +108,6 @@ func CasefoldName(name string) (string, error) { return lowered, err } -// "boring" names are exempt from skeletonization. -// this is because confusables.txt considers various pure ASCII alphanumeric -// strings confusable: 0 and O, 1 and l, m and rn. IMO this causes more problems -// than it solves. -func isBoring(name string) bool { - for i := 0; i < len(name); i += 1 { - chr := name[i] - if (chr >= 'a' && chr <= 'z') || (chr >= 'A' && chr <= 'Z') || (chr >= '0' && chr <= '9') { - continue // alphanumerics - } - switch chr { - case '$', '%', '^', '&', '(', ')', '{', '}', '[', ']', '<', '>', '=': - continue // benign printable ascii characters - default: - return false // potentially confusable ascii like | ' `, non-ascii - } - } - return true -} - // returns true if the given name is a valid ident, using a mix of Insp and // Chary's ident restrictions. func isIdent(name string) bool { @@ -168,9 +148,7 @@ func Skeleton(name string) (string, error) { // same as PRECIS: name = width.Fold.String(name) - if !isBoring(name) { - name = confusables.Skeleton(name) - } + name = confusables.SkeletonTweaked(name) // internationalized lowercasing for skeletons; this is much more lenient than // Casefold. In particular, skeletons are expected to mix scripts (which may diff --git a/irc/strings_test.go b/irc/strings_test.go index 40d32f68..b24bf08d 100644 --- a/irc/strings_test.go +++ b/irc/strings_test.go @@ -128,18 +128,6 @@ func TestCasefoldName(t *testing.T) { } } -func TestIsBoring(t *testing.T) { - assertBoring := func(str string, expected bool) { - if isBoring(str) != expected { - t.Errorf("expected [%s] to have boringness [%t], but got [%t]", str, expected, !expected) - } - } - - assertBoring("warning", true) - assertBoring("phi|ip", false) - assertBoring("Νικηφόρος", false) -} - func TestIsIdent(t *testing.T) { assertIdent := func(str string, expected bool) { if isIdent(str) != expected { diff --git a/vendor b/vendor index 8ddbb531..42b0d2d5 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 8ddbb531841add50f8b7aff8fe00bef311448aaa +Subproject commit 42b0d2d5d24a9b0ed4295fa04fd66e7c4ff27fa8 From 29b1dd37a86db5f7c24779ac790979a6e6e42a39 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 20 Jun 2019 00:24:42 -0400 Subject: [PATCH 05/23] manual and changelog updates for #563 --- CHANGELOG.md | 10 +++++++--- docs/MANUAL.md | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eefbc1d..b6269e1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,16 +10,20 @@ We're pleased to be publishing the release candidate for 1.1.0 (the official rel * Support for the newly ratified [message tags](https://ircv3.net/specs/extensions/message-tags.html) and [message ID](https://ircv3.net/specs/extensions/message-ids.html) IRCv3 specifications; client developers are invited to use Oragono as a reference when implementing these specifications. * Support for running Oragono as a Tor hidden service. +### Upgrade notes + This release includes a database change. If you have `datastore.autoupgrade` set to `true` in your configuration, it will be automatically applied when you restart Oragono; otherwise, you can update the database manually by running `oragono upgradedb`. +No changes to your configuration file should be required for this upgrade; however, updating the file is necessary to enable some new functionality, as described below. + ### Config changes * `tor-listeners` section added for configuring listeners for use with Tor. * `compatibility` section added for toggling compatibility behaviors for legacy clients. * `ip-cloaking` section added for configuring cloaking. * `bouncer` section added for configuring bouncer-like features (in particular, whether multiple clients can use the same nickname). -* `check-ident` now defaults to `false`. -* `nick-reservation.method` now defaults to `"strict"`. -* `fakelag.enabled` now defaults to `true` +* `check-ident` now has recommended value `false`. +* `nick-reservation.method` now has recommended value "strict"`. +* `fakelag.enabled` now has recommended value `true`. * `limits.linelen.tags` removed due to ratification of the [message-tags spec](https://ircv3.net/specs/extensions/message-tags.html), which fixes the maximum tags length at 8191 bytes. * `limits.registration-messages` added to restrict how many messages a user can send to the server during connection registration (while connecting to the server). * `channels.operator-only-creation` added to optionally restrict creation of new channels to ircops (#537). diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 7dd564f4..bdfdf45d 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -22,6 +22,7 @@ _Copyright © Daniel Oaks , Shivaram Lingamneni Date: Thu, 20 Jun 2019 00:33:19 -0400 Subject: [PATCH 06/23] refer manual db upgraders to the manual --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6269e1a..c1932c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ We're pleased to be publishing the release candidate for 1.1.0 (the official rel ### Upgrade notes -This release includes a database change. If you have `datastore.autoupgrade` set to `true` in your configuration, it will be automatically applied when you restart Oragono; otherwise, you can update the database manually by running `oragono upgradedb`. +This release includes a database change. If you have `datastore.autoupgrade` set to `true` in your configuration, it will be automatically applied when you restart Oragono. Otherwise, you can update the database manually by running `oragono upgradedb` (see the manual for complete instructions). No changes to your configuration file should be required for this upgrade; however, updating the file is necessary to enable some new functionality, as described below. From 990d76923c6f374aadcfb7a50c0183facc748bd3 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Sun, 23 Jun 2019 15:54:33 -0400 Subject: [PATCH 07/23] bump vendor again --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- vendor | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index a7a47151..bf3aa178 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -62,11 +62,11 @@ revision = "9520e82c474b0a04dd04f8a40959027271bab992" [[projects]] - digest = "1:940e48aff4b5fe62c3e6fd1245cc35271327a424b7ffbe4febfa83ff8f9c4f53" + digest = "1:5e7ab79f15b8734a3d7b1fe09e943b4bdd01587006a94a51737d32ac84bb84f3" name = "github.com/oragono/confusables" packages = ["."] pruneopts = "UT" - revision = "e65e89839ad43b68dbea2d3ca62f0f1c594b029a" + revision = "7ad2fd2ae159c35dc6004add297296011e6f2755" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index ed8deed7..bdc9e11b 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -50,7 +50,7 @@ name = "github.com/oragono/go-ident" [[constraint]] - revision = "e65e89839ad43b68dbea2d3ca62f0f1c594b029a" + revision = "7ad2fd2ae159c35dc6004add297296011e6f2755" name = "github.com/oragono/confusables" [[constraint]] diff --git a/vendor b/vendor index 42b0d2d5..a46f2f2b 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 42b0d2d5d24a9b0ed4295fa04fd66e7c4ff27fa8 +Subproject commit a46f2f2b67cfbb9974548de5bb58c72306ec861c From b075ea6eb98ac27f95bad3c6a9c49c3b769b37e8 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 00:14:39 -0400 Subject: [PATCH 08/23] use regular Skeleton instead of SkeletonTweaked dan: "I probably wouldn't expect those mappings to cause much trouble at all for legitimate users at the end of the day" shivaram: [concurs] --- irc/strings.go | 2 +- irc/strings_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/irc/strings.go b/irc/strings.go index d0bbf8b1..c665dca5 100644 --- a/irc/strings.go +++ b/irc/strings.go @@ -148,7 +148,7 @@ func Skeleton(name string) (string, error) { // same as PRECIS: name = width.Fold.String(name) - name = confusables.SkeletonTweaked(name) + name = confusables.Skeleton(name) // internationalized lowercasing for skeletons; this is much more lenient than // Casefold. In particular, skeletons are expected to mix scripts (which may diff --git a/irc/strings_test.go b/irc/strings_test.go index b24bf08d..d1e8b76c 100644 --- a/irc/strings_test.go +++ b/irc/strings_test.go @@ -153,15 +153,15 @@ func TestSkeleton(t *testing.T) { return skel } - if skeleton("warning") == skeleton("waming") { - t.Errorf("Oragono shouldn't consider rn confusable with m") + if skeleton("warning") != skeleton("waming") { + t.Errorf("i give up, Oragono should consider rn confusable with m") } if skeleton("Phi|ip") != "philip" { t.Errorf("but we still consider pipe confusable with l") } - if skeleton("smt") != "smt" { + if skeleton("smt") != skeleton("smt") { t.Errorf("fullwidth characters should skeletonize to plain old ascii characters") } @@ -169,7 +169,7 @@ func TestSkeleton(t *testing.T) { t.Errorf("after skeletonizing, we should casefold") } - if skeleton("smt") != "smt" { + if skeleton("smt") != skeleton("smt") { t.Errorf("our friend lover successfully tricked the skeleton algorithm!") } From 4e9c0fbc00829499ac78c6eec47330856f7e3641 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 00:29:44 -0400 Subject: [PATCH 09/23] revert vendor changes --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- vendor | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index bf3aa178..73ab4a22 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -62,11 +62,11 @@ revision = "9520e82c474b0a04dd04f8a40959027271bab992" [[projects]] - digest = "1:5e7ab79f15b8734a3d7b1fe09e943b4bdd01587006a94a51737d32ac84bb84f3" + digest = "1:7caf3ea977a13cd8b9a2e1ecef1ccaa8e38f831b4f6ffcb8bd0aa909c48afb3a" name = "github.com/oragono/confusables" packages = ["."] pruneopts = "UT" - revision = "7ad2fd2ae159c35dc6004add297296011e6f2755" + revision = "d5dd03409482fae2457f0742be22782890f720c2" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index bdc9e11b..b4656ed4 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -50,7 +50,7 @@ name = "github.com/oragono/go-ident" [[constraint]] - revision = "7ad2fd2ae159c35dc6004add297296011e6f2755" + revision = "d5dd03409482fae2457f0742be22782890f720c2" name = "github.com/oragono/confusables" [[constraint]] diff --git a/vendor b/vendor index a46f2f2b..8ddbb531 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit a46f2f2b67cfbb9974548de5bb58c72306ec861c +Subproject commit 8ddbb531841add50f8b7aff8fe00bef311448aaa From ee08419f4afd915eb911fa0defb26e83aec8c353 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 06:14:57 -0400 Subject: [PATCH 10/23] bump vendor --- Gopkg.lock | 4 ++-- Gopkg.toml | 2 +- vendor | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 73ab4a22..44f9f977 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -62,11 +62,11 @@ revision = "9520e82c474b0a04dd04f8a40959027271bab992" [[projects]] - digest = "1:7caf3ea977a13cd8b9a2e1ecef1ccaa8e38f831b4f6ffcb8bd0aa909c48afb3a" + digest = "1:e7de6e4830c9d4fe1463c09a2ee15ec3eb9455c2ea916044675c413e8a9c6608" name = "github.com/oragono/confusables" packages = ["."] pruneopts = "UT" - revision = "d5dd03409482fae2457f0742be22782890f720c2" + revision = "fe1cf31a24b01cac37194669863df51713e08e54" [[projects]] branch = "master" diff --git a/Gopkg.toml b/Gopkg.toml index b4656ed4..ce82a969 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -50,7 +50,7 @@ name = "github.com/oragono/go-ident" [[constraint]] - revision = "d5dd03409482fae2457f0742be22782890f720c2" + revision = "fe1cf31a24b01cac37194669863df51713e08e54" name = "github.com/oragono/confusables" [[constraint]] diff --git a/vendor b/vendor index 8ddbb531..6fb1b63d 160000 --- a/vendor +++ b/vendor @@ -1 +1 @@ -Subproject commit 8ddbb531841add50f8b7aff8fe00bef311448aaa +Subproject commit 6fb1b63d24a6ccc28a8aecbd47a7eb18a2ace2c9 From 24c46235a34e0d7537ec18c45c1bfcaf7e565bb8 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 06:18:18 -0400 Subject: [PATCH 11/23] remove m -> rn skeleton mapping again --- irc/strings.go | 2 +- irc/strings_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/irc/strings.go b/irc/strings.go index c665dca5..d0bbf8b1 100644 --- a/irc/strings.go +++ b/irc/strings.go @@ -148,7 +148,7 @@ func Skeleton(name string) (string, error) { // same as PRECIS: name = width.Fold.String(name) - name = confusables.Skeleton(name) + name = confusables.SkeletonTweaked(name) // internationalized lowercasing for skeletons; this is much more lenient than // Casefold. In particular, skeletons are expected to mix scripts (which may diff --git a/irc/strings_test.go b/irc/strings_test.go index d1e8b76c..36d67e0c 100644 --- a/irc/strings_test.go +++ b/irc/strings_test.go @@ -153,8 +153,8 @@ func TestSkeleton(t *testing.T) { return skel } - if skeleton("warning") != skeleton("waming") { - t.Errorf("i give up, Oragono should consider rn confusable with m") + if skeleton("warning") == skeleton("waming") { + t.Errorf("Oragono shouldn't consider rn confusable with m") } if skeleton("Phi|ip") != "philip" { @@ -165,7 +165,7 @@ func TestSkeleton(t *testing.T) { t.Errorf("fullwidth characters should skeletonize to plain old ascii characters") } - if skeleton("SMT") != "smt" { + if skeleton("SMT") != skeleton("smt") { t.Errorf("after skeletonizing, we should casefold") } From 9d2ecd48565351114d177fa3572d6a8aab0670fc Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 24 Jun 2019 20:23:21 +1000 Subject: [PATCH 12/23] New translations irc.lang.json (French) --- languages/fr-FR-irc.lang.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/languages/fr-FR-irc.lang.json b/languages/fr-FR-irc.lang.json index 2ac02151..a637c24f 100644 --- a/languages/fr-FR-irc.lang.json +++ b/languages/fr-FR-irc.lang.json @@ -1,14 +1,14 @@ { "$bWarning: unregistering this account will remove its stored privileges.$b": "$bAttention : effacer ce compte lèvera ses privilèges.$b", "$bWarning: unregistering this channel will remove all stored channel attributes.$b": "$bAttention : effacer ce canal le démunira de ses attributs.$b", - "%[1]d. User %[2]s requests vhost: %[3]s": "", - "%[1]s [account: %[2]s] joined the channel": "", + "%[1]d. User %[2]s requests vhost: %[3]s": "%[1]d. %[2]s demande l’hôtel virtuel : %[3]s", + "%[1]s [account: %[2]s] joined the channel": "%[1]s [%[2]s] a rejoint le canal", "%[1]s changed nick to %[2]s": "%[1]s a changé de nom pour %[2]s", "%[1]s kicked %[2]s (%[3]s)": "%[1]s a éjecté %[2]s (%[3]s)", "%[1]s left the channel (%[2]s)": "%[1]s a quitté le canal (%[2]s)", - "%[1]s quit (%[2]s)": "", + "%[1]s quit (%[2]s)": "%[1]s est parti·e (%[2]s)", "%s joined the channel": "%s a rejoint le canal", - "*** $bEnd of %s HELP$b ***": "", + "*** $bEnd of %s HELP$b ***": "*** $bFin de %s AIDE$b ***", "*** Could not find your username": "*** Impossible de trouver votre nom d’utilisateurice", "*** Found your username": "*** Nom d’utilisateurice trouvé", "*** Got a malformed username, ignoring": "*** Reçu mauvais nom d’utilisateurice", @@ -42,7 +42,7 @@ "Bouncer functionality is currently disabled for your account, but you can opt in": "", "Bouncer functionality is currently enabled for your account": "", "Bouncer functionality is currently enabled for your account, but you can opt out": "", - "CTCP messages are disabled over Tor": "", + "CTCP messages are disabled over Tor": "Les messages CTCP sont désactivés via Tor", "Can't change modes for other users": "Impossible de changer les modes d’autres utilisateurices", "Can't view modes for other users": "Impossible de voir les modes des autres utilisateurices", "Cannot join channel (+%s)": "Impossible de joindre (+%s)", @@ -57,7 +57,7 @@ "Channel %[1]s has %[2]d persistent modes set": "", "Channel %s is now unregistered": "", "Channel %s successfully registered": "", - "Channel does not exist": "", + "Channel does not exist": "Ce canal n’existe pas", "Channel doesn't have roleplaying mode available": "", "Channel is not registered": "", "Channel list is full": "La liste de canaux est pleine", @@ -91,11 +91,11 @@ "End of list": "Fin de liste", "Erroneous nickname": "Nom inadéquat", "Error loading account data": "", - "Error reserving nickname": "", + "Error reserving nickname": "Erreur lors de la réservation du nom", "Error while unregistering account": "Erreur au cours de la suppression du compte", "Fake source must be a valid nickname": "", "First param must be a mask or channel": "", - "GHOSTed by %s": "", + "GHOSTed by %s": "Déconnecté·e via Ghost par %s", "Given current server settings, your nickname is enforced with: %s": "", "HELPOP \n\nGet an explanation of , or \"index\" for a list of help topics.": "", "Help not found": "Aide introuvable", @@ -103,10 +103,10 @@ "I have %[1]d clients and %[2]d servers": "J’ai %[1]d client(s), et %[2]d serveur(s)", "I'll be right back": "De retour dans un instant !", "IP address: %s": "Adresse IP : %s", - "IRC Operators online": "", + "IRC Operators online": "Opérateurices IRC en ligne", "Input line too long": "", "Insufficient oper privs": "", - "Insufficient privileges": "", + "Insufficient privileges": "Privilèges insuffisants", "Internal error": "Erreur interne", "Invalid CAP subcommand": "", "Invalid account name": "Nom de compte invalide", @@ -117,9 +117,9 @@ "JOIN 0 is not allowed": "", "Language %s is not supported by this server": "", "Language preferences have been set": "", - "Last active: %s": "", + "Last active: %s": "Dernière activité : %s", "MOTD File is missing": "Message du jour manquant", - "Malformed username": "", + "Malformed username": "Nom erroné", "Mask isn't valid": "Masque invalide", "Must register with current nickname instead of separate account name": "", "Network service, for more info /msg %s HELP": "", From 804efaa9140e27c695be087959bf4b6b90146195 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 06:30:19 -0400 Subject: [PATCH 13/23] set wrap_in_directory, fixes #563 --- .goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9b679eb3..48fd5bee 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -47,5 +47,6 @@ archive: - languages/*.yaml - languages/*.json - languages/*.md + wrap_in_directory: true checksum: name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt" From 08d346ce5030d52ee3bff1b8509e601ed377012f Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 24 Jun 2019 06:32:57 -0400 Subject: [PATCH 14/23] make release should depend on deps --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a355b42c..4aaf1fc7 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ all: install install: deps ./install.sh -release: +release: deps goreleaser --skip-publish --rm-dist capdefs: From c015616ba9b34d472caec0686bed5707933d7d90 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Tue, 25 Jun 2019 08:22:17 +1000 Subject: [PATCH 15/23] New translations irc.lang.json (French) --- languages/fr-FR-irc.lang.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/languages/fr-FR-irc.lang.json b/languages/fr-FR-irc.lang.json index a637c24f..5a76d74e 100644 --- a/languages/fr-FR-irc.lang.json +++ b/languages/fr-FR-irc.lang.json @@ -104,8 +104,8 @@ "I'll be right back": "De retour dans un instant !", "IP address: %s": "Adresse IP : %s", "IRC Operators online": "Opérateurices IRC en ligne", - "Input line too long": "", - "Insufficient oper privs": "", + "Input line too long": "Entrée trop longue", + "Insufficient oper privs": "Privilèges opérateurices insuffisants", "Insufficient privileges": "Privilèges insuffisants", "Internal error": "Erreur interne", "Invalid CAP subcommand": "", @@ -115,8 +115,8 @@ "Invalid vhost": "Vhost invalide", "It was rejected for reason: %s": "", "JOIN 0 is not allowed": "", - "Language %s is not supported by this server": "", - "Language preferences have been set": "", + "Language %s is not supported by this server": "Le langage %s n’est pas proposé sur ce serveur", + "Language preferences have been set": "Vos préférences linguistiques ont été enregistrées", "Last active: %s": "Dernière activité : %s", "MOTD File is missing": "Message du jour manquant", "Malformed username": "Nom erroné", From 57821c865ac379afc4c2e5af5fa4129107f25e6e Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 25 Jun 2019 19:59:04 -0400 Subject: [PATCH 16/23] bump version to 1.1.0 --- irc/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irc/constants.go b/irc/constants.go index db26df43..217ddd4e 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -9,7 +9,7 @@ import "fmt" const ( // SemVer is the semantic version of Oragono. - SemVer = "1.1.0-rc1" + SemVer = "1.1.0" ) var ( From cf045f7d2c638a302ad04cb33ca1c5214db3dea9 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 25 Jun 2019 23:07:39 -0400 Subject: [PATCH 17/23] changelog updates --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1932c93..97cca759 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Changelog All notable changes to Oragono will be documented in this file. -## [1.1.0-rc1] - 2019-06-11 -We're pleased to be publishing the release candidate for 1.1.0 (the official release should follow in a week or two, with more complete credits). This version has a number of exciting improvements, including: +## [1.1.0] - 2019-06-27 +We're pleased to announce Oragono version 1.1.0. This version has a number of exciting improvements, including: * Simplified commands for registering new accounts with NickServ. * Support for IP cloaking. @@ -10,11 +10,13 @@ We're pleased to be publishing the release candidate for 1.1.0 (the official rel * Support for the newly ratified [message tags](https://ircv3.net/specs/extensions/message-tags.html) and [message ID](https://ircv3.net/specs/extensions/message-ids.html) IRCv3 specifications; client developers are invited to use Oragono as a reference when implementing these specifications. * Support for running Oragono as a Tor hidden service. +Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), and [@jwheare](https://github.com/jwheare) for reporting issues and contributing patches, and to $TRANSLATORS for contributing translations. + ### Upgrade notes This release includes a database change. If you have `datastore.autoupgrade` set to `true` in your configuration, it will be automatically applied when you restart Oragono. Otherwise, you can update the database manually by running `oragono upgradedb` (see the manual for complete instructions). -No changes to your configuration file should be required for this upgrade; however, updating the file is necessary to enable some new functionality, as described below. +No changes to your configuration file should be required for this upgrade. However, updating the file is necessary to enable some new functionality, as described below. ### Config changes * `tor-listeners` section added for configuring listeners for use with Tor. @@ -30,6 +32,7 @@ No changes to your configuration file should be required for this upgrade; howev ### Security * Users can no longer impersonate network services like ChanServ by using confusing nicks like "ChɑnServ" (#519, thanks [@csmith](https://github.com/csmith)!). +* Closed several loopholes in confusable nick detection (#562, #564, #570, thanks lover!) * Secret channels (mode `+s`) now act more secret (#380, thanks [@csmith](https://github.com/csmith)!). * The `+R` (registered-only) mode now prevents unregistered users from joining the channel, not just from speaking (#463, thanks [@bogdomania](https://github.com/bogdomania)!). * Limited how many messages clients can send during connection registration to mitigate potential DoS attacks (#505). From b45dfbc09f5eff9ddd575d6d3aaa1ae8a3d01f0c Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 25 Jun 2019 23:09:37 -0400 Subject: [PATCH 18/23] add missing bugreport credits --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97cca759..a06ef5f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ We're pleased to announce Oragono version 1.1.0. This version has a number of ex * Support for the newly ratified [message tags](https://ircv3.net/specs/extensions/message-tags.html) and [message ID](https://ircv3.net/specs/extensions/message-ids.html) IRCv3 specifications; client developers are invited to use Oragono as a reference when implementing these specifications. * Support for running Oragono as a Tor hidden service. -Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), and [@jwheare](https://github.com/jwheare) for reporting issues and contributing patches, and to $TRANSLATORS for contributing translations. +Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), [@jwheare](https://github.com/jwheare), lover, and [@transitracer](https://github.com/oragono/oragono/issues/456) for reporting issues and contributing patches, and to $TRANSLATORS for contributing translations. ### Upgrade notes From 5c01d5bc71effe95314102921dae3732c357d1ae Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 28 Jun 2019 12:45:12 +1000 Subject: [PATCH 19/23] Add translator credits --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a06ef5f4..5bf15916 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ We're pleased to announce Oragono version 1.1.0. This version has a number of ex * Support for the newly ratified [message tags](https://ircv3.net/specs/extensions/message-tags.html) and [message ID](https://ircv3.net/specs/extensions/message-ids.html) IRCv3 specifications; client developers are invited to use Oragono as a reference when implementing these specifications. * Support for running Oragono as a Tor hidden service. -Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), [@jwheare](https://github.com/jwheare), lover, and [@transitracer](https://github.com/oragono/oragono/issues/456) for reporting issues and contributing patches, and to $TRANSLATORS for contributing translations. +Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), [@jwheare](https://github.com/jwheare), lover, and [@transitracer](https://github.com/oragono/oragono/issues/456) for reporting issues and contributing patches, and also to [@bogdomania](https://github.com/bogdomania), Elvedin Husic, Nuve, and streaps for contributing translations. ### Upgrade notes @@ -66,6 +66,8 @@ No changes to your configuration file should be required for this upgrade. Howev * Support for the [draft/event-playback](https://github.com/DanielOaks/ircv3-specifications/blob/master+event-playback/extensions/batch/history.md) spec (#457). * The `TAGMSG` and `NICK` messages are now replayable in history (#457). * Added the draft IRCv3 [`SETNAME` command](https://ircv3.net/specs/extensions/setname) for changing your realname (#372). +* Added new Bosnian (bs-BA) translation (thanks to Elvedin Husic!). +* Added new German (de-DE) translation (thanks to streaps!). ### Changed * Registering an account with NickServ is now `/msg NickServ register `, which registers the current nickname as an account, matching other services (#410). @@ -86,6 +88,8 @@ No changes to your configuration file should be required for this upgrade. Howev * `NICKSERV ENFORCE` is deprecated in favor of the new `NICKSERV SET ENFORCE` (the old syntax is still available as an alias). * The `WHO` command is now treated like `PONG` in that it doesn't count as user activity, since client software often uses it automatically (#485). * The `NAMES` command now only returns results for the first given channel (#534). +* Updated French (fr-FR) translation (thanks to Nuve!). +* Updated Română (ro-RO) translation (thanks to [@bogdomania](https://github.com/bogdomania)!). ### Internal Notes * Building Oragono is now easier (#409). From dccb46022d6d6b6bbc2ac2fd23a3f2a8daa04888 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 28 Jun 2019 12:51:32 +1000 Subject: [PATCH 20/23] New translations translation.lang.yaml (French) --- languages/fr-FR.lang.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/fr-FR.lang.yaml b/languages/fr-FR.lang.yaml index 6d841fb5..0a611988 100644 --- a/languages/fr-FR.lang.yaml +++ b/languages/fr-FR.lang.yaml @@ -1,5 +1,5 @@ --- name: "Français" code: "fr-FR" -contributors: "Joshua Kwan " +contributors: "Joshua Kwan , Nuve" incomplete: true From 7b6e5e4348dbcc3d83bb974a16060d087ae55e13 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 27 Jun 2019 22:52:20 -0400 Subject: [PATCH 21/23] tweak translator credits --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bf15916..f42f5d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ We're pleased to announce Oragono version 1.1.0. This version has a number of ex * Support for the newly ratified [message tags](https://ircv3.net/specs/extensions/message-tags.html) and [message ID](https://ircv3.net/specs/extensions/message-ids.html) IRCv3 specifications; client developers are invited to use Oragono as a reference when implementing these specifications. * Support for running Oragono as a Tor hidden service. -Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), [@jwheare](https://github.com/jwheare), lover, and [@transitracer](https://github.com/oragono/oragono/issues/456) for reporting issues and contributing patches, and also to [@bogdomania](https://github.com/bogdomania), Elvedin Husic, Nuve, and streaps for contributing translations. +Many thanks to [@Ascrod](https://github.com/Ascrod), [@amyspark](https://github.com/amyspark), [@bogdomania](https://github.com/bogdomania), [@csmith](https://github.com/csmith), [@jesopo](https://github.com/jesopo), [@jwheare](https://github.com/jwheare), lover, and [@transitracer](https://github.com/oragono/oragono/issues/456) for reporting issues and contributing patches, and also to [@bogdomania](https://github.com/bogdomania), Elvedin Hušić, Nuve, and [@streaps](https://github.com/streaps) for contributing translations. ### Upgrade notes From 1d7e3c5f3277f27fca90e7d2503b40ec594a1784 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 27 Jun 2019 22:59:01 -0400 Subject: [PATCH 22/23] another tweak --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f42f5d02..e90a65db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,7 +66,7 @@ No changes to your configuration file should be required for this upgrade. Howev * Support for the [draft/event-playback](https://github.com/DanielOaks/ircv3-specifications/blob/master+event-playback/extensions/batch/history.md) spec (#457). * The `TAGMSG` and `NICK` messages are now replayable in history (#457). * Added the draft IRCv3 [`SETNAME` command](https://ircv3.net/specs/extensions/setname) for changing your realname (#372). -* Added new Bosnian (bs-BA) translation (thanks to Elvedin Husic!). +* Added new Bosnian (bs-BA) translation (thanks to Elvedin Hušić!). * Added new German (de-DE) translation (thanks to streaps!). ### Changed From 9ce3bed4a2833c3589d5171e77417e4361dfcbdb Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Fri, 28 Jun 2019 22:17:43 +1000 Subject: [PATCH 23/23] Setup v1.2.0-unreleased devel ver --- CHANGELOG.md | 16 ++++++++++++++++ irc/constants.go | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e90a65db..6993cf1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,22 @@ # Changelog All notable changes to Oragono will be documented in this file. +## Unreleased +New release of Oragono! + +### Config Changes + +### Security + +### Added + +### Changed + +### Removed + +### Fixed + + ## [1.1.0] - 2019-06-27 We're pleased to announce Oragono version 1.1.0. This version has a number of exciting improvements, including: diff --git a/irc/constants.go b/irc/constants.go index 217ddd4e..e91c0ff3 100644 --- a/irc/constants.go +++ b/irc/constants.go @@ -9,7 +9,7 @@ import "fmt" const ( // SemVer is the semantic version of Oragono. - SemVer = "1.1.0" + SemVer = "1.2.0-unreleased" ) var (