From 97f3a1e63ae7b91d14ad1c97744c7d28f89e98f5 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 10 Apr 2023 11:41:10 -0600 Subject: [PATCH 1/2] Update copyright to 2023 --- LICENSE.TXT | 2 +- README.md | 2 +- core/connect.js | 6 +++--- core/qwk_mail_packet.js | 2 +- docs/_docs/installation/testing.md | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LICENSE.TXT b/LICENSE.TXT index 6fca7184..c2ae489c 100644 --- a/LICENSE.TXT +++ b/LICENSE.TXT @@ -1,4 +1,4 @@ -Copyright (c) 2015-2022, Bryan D. Ashby +Copyright (c) 2015-2023, Bryan D. Ashby All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index da8dcf38..ced99366 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ ENiGMA has been tested with many terminals. However, the following are suggested ## License Released under the [BSD 2-clause](https://opensource.org/licenses/BSD-2-Clause) license: -Copyright (c) 2015-2022, Bryan D. Ashby +Copyright (c) 2015-2023, Bryan D. Ashby All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/core/connect.js b/core/connect.js index affa4eec..489fd187 100644 --- a/core/connect.js +++ b/core/connect.js @@ -105,7 +105,7 @@ function ansiAttemptDetectUTF8(client, cb) { withCursorPositionReport( client, pos => { - const [_, w] = pos; + const [, w] = pos; const len = w - initialPosition[1]; if (!isNaN(len) && len >= ASCIIPortion.length + 6) { // CP437 displays 3 chars each Unicode skull @@ -154,7 +154,7 @@ const ansiQuerySyncTermFontSupport = (client, cb) => { withCursorPositionReport( client, pos => { - const [_, w] = pos; + const [, w] = pos; if (w === 1) { // cursor didn't move client.log.info(`SyncTERM font support enabled on node ${client.node}`); @@ -234,7 +234,7 @@ function displayBanner(term) { // note: intentional formatting: term.pipeWrite(` |06Connected to |02EN|10i|02GMA|10½ |06BBS version |12|VN -|06Copyright (c) 2014-2022 Bryan Ashby |14- |12http://l33t.codes/ +|06Copyright (c) 2014-2023 Bryan Ashby |14- |12http://l33t.codes/ |06Updates & source |14- |12https://github.com/NuSkooler/enigma-bbs/ |00`); } diff --git a/core/qwk_mail_packet.js b/core/qwk_mail_packet.js index a22be749..bf71da5a 100644 --- a/core/qwk_mail_packet.js +++ b/core/qwk_mail_packet.js @@ -1076,7 +1076,7 @@ class QWKPacketWriter extends EventEmitter { } // First block is a space padded ID - const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2022 Bryan Ashby`; + const id = `Created with ENiGMA 1/2 BBS v${enigmaVersion} Copyright (c) 2015-2023 Bryan Ashby`; this.messagesStream.write( id.padEnd(QWKMessageBlockSize, ' '), 'ascii' diff --git a/docs/_docs/installation/testing.md b/docs/_docs/installation/testing.md index 1982d0d2..fb095c75 100644 --- a/docs/_docs/installation/testing.md +++ b/docs/_docs/installation/testing.md @@ -13,7 +13,7 @@ _Note that if you've used the [Docker](docker.md) installation method, you've al If everything went OK: ```text -ENiGMA½ Copyright (c) 2014-2022, Bryan Ashby +ENiGMA½ Copyright (c) 2014-2023, Bryan Ashby _____________________ _____ ____________________ __________\_ / \__ ____/\_ ____ \ /____/ / _____ __ \ / ______/ // /___jp! // __|___// | \// |// | \// | | \// \ /___ /_____ From 0b59d0e3b539df0c4ec8312c8f00919ddb70abf7 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Mon, 10 Apr 2023 11:47:27 -0600 Subject: [PATCH 2/2] Strip codes from auto sig for summary --- core/activitypub/actor.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/activitypub/actor.js b/core/activitypub/actor.js index 45fadf2c..16af216f 100644 --- a/core/activitypub/actor.js +++ b/core/activitypub/actor.js @@ -13,6 +13,8 @@ const ActivityPubSettings = require('./settings'); const ActivityPubObject = require('./object'); const { ActivityStreamMediaType, Collections } = require('./const'); const Config = require('../config').get; +const { stripMciColorCodes } = require('../color_codes'); +const { stripAnsiControlCodes } = require('../string_util'); // deps const _ = require('lodash'); @@ -107,6 +109,11 @@ module.exports = class Actor extends ActivityPubObject { } }; + const summary = stripMciColorCodes( + stripAnsiControlCodes(user.getProperty(UserProps.AutoSignature) || ''), + { mode: 'nonAsciiPrintable' } + ); + const obj = { id: userActorId, type: 'Person', @@ -121,7 +128,7 @@ module.exports = class Actor extends ActivityPubObject { outbox: Endpoints.outbox(user), followers: Endpoints.followers(user), following: Endpoints.following(user), - summary: user.getProperty(UserProps.AutoSignature) || '', + summary, url: Endpoints.profile(user), manuallyApprovesFollowers: userSettings.manuallyApprovesFollowers, discoverable: userSettings.discoverable,