Fix the tests.

Fix the tests.

This is a total hatchet-job, but the tests seem to do a lot of things that they should not.
At any rate, there are no more bare escapes embedded in these files.  I do not know why the
build script wants `make test` to pass.
  • [DH] chat/message/theme.go
  • [DH] chat/message/theme_test.go
  • [DH] chat/message/user.go
  • [DH] chat/message/user_test.go
  • [DH] chat/room_test.go
  • [DH] host_test.go

That would have bugged me if I didn't do this.

That would have bugged me if I didn't do this.
  • [DH] chat/room_test.go

Update Go version.

Update Go version.

A part that I didn't write requires 1.17 or higher.
  • [DH] go.mod

Add filename as description when uploading.

Add filename as description when uploading.

It looks like it still relies on server support and does not result in
filenames appearing in posts, at least on SPC.
  • [DH] mastodon/mastodon.go

Since this version doesn't understand echomo reactions, exclude them from the notific...

Since this version doesn't understand echomo reactions, exclude them from the notifications.
  • [DH] service/service.go

cmd/ssh-chat: Accept multiple --identity keys

cmd/ssh-chat: Accept multiple --identity keys

Fixes #401
  • [DH] cmd/ssh-chat/cmd.go

sshd/terminal/terminal.go: Clamp pos to protect from some fuzzing failures

sshd/terminal/terminal.go: Clamp pos to protect from some fuzzing failures
  • [DH] sshd/terminal/terminal.go

/back, /away: Change no-op to return err

/back, /away: Change no-op to return err

Fixes #402

When the user is not set as away, using the
`/back` or `/away` command should return error.
The previous behaviour was inconsistent,
`/away` sent a message and `/back` ignored it.
New behaviour is error for both cases.

Co-authored-by: Akshay 
  • [DH] chat/command.go
  • [DH] chat/command_test.go

Update ssh.chat pubkey

Update ssh.chat pubkey
  • [DH] README.md

go mod update for golang.org/x/crypto/ssh

go mod update for golang.org/x/crypto/ssh
  • [DH] go.mod
  • [DH] go.sum

Add /allowlist command (#399)

Add /allowlist command (#399)

* move loading whitelist+ops from file to auth and save the loaded files fro reloading

* add /whitelist command with lots of open questions

* add test for /whitelist

* gofmt

* use the same auth (the tests don't seem to care, but htis is more right)

* mutex whitelistMode and remove some deferred TODOs

* s/whitelist/allowlist/ (user-facing); move helper functions outside the handler function

* check for ops in Auth.CheckPublicKey and move /allowlist handling to helper functions

* possibly fix the test timeout in HostNameCollision

* Revert "possibly fix the test timeout in HostNameCollision" (didn't work)

This reverts commit 664dbb0976f8f10ea7a673950a879591c2e7c320.

* managed to reproduce the timeout after updating, hopefully it's the same one

* remove some unimportant TODOs; add a message when reverify kicks people; add a reverify test

* add client connection with key; add test for /allowlist import AGE

* hopefully make test less racy

* s/whitelist/allowlist/

* fix crash on specifying exactly one more -v flag than the max level

* use a key loader function to move file reading out of auth

* add loader to allowlist test

* minor message changes

* add --whitelist with a warning; update tests for messages

* apparently, we have another prefix

* check names directly on the User objects in TestHostNameCollision

* not allowlisted -> not allowed

* small message change

* update test
  • [DH] auth.go
  • [DH] auth_test.go
  • [DH] cmd/ssh-chat/cmd.go
  • [DH] host.go
  • [DH] host_test.go
  • [DH] sshd/client.go
  • [DH] sshd/net_test.go

go mod update

go mod update
  • [DH] go.mod
  • [DH] go.sum

Docker Compose manifest: mount host's keys and few other improvements.

Docker Compose manifest: mount host's keys and few other improvements.
* Add SSH keys mount (mimicking default non-Docker behaviour).
* Increase manifest version to lowest 3.x supporting bind mounts.
* Change restart policy from `always` to `unless-stopped`.
* Set a container name.
* Fix port indentation to 2 spaces, as done elsewhere.
  • [DH] README.md
  • [DH] docker-compose.yml

Merge pull request #410 from pataquets/master

Merge pull request #410 from pataquets/master

Docker Compose manifest: mount host's keys and few other improvements.
  • [DH] README.md
  • [DH] docker-compose.yml

message.go: stripping emoji for when no theme is set

message.go: stripping emoji for when no theme is set
  • [DH] chat/message/message.go

host.go: avoiding motd output if bot mode set

host.go: avoiding motd output if bot mode set
  • [DH] host.go

Merge pull request #417 from sleibrock/motd-bot-fix

Merge pull request #417 from sleibrock/motd-bot-fix

host.go: avoiding motd output if bot mode set
  • [DH] host.go

Merge pull request #416 from sleibrock/master

Merge pull request #416 from sleibrock/master

Fixing emojis being sent in PMs when no theme is set (#414)
  • [DH] chat/message/message.go

go mod update

go mod update

Fixes #419 #409
  • [DH] go.mod
  • [DH] go.sum

add: build releases for linux/arm64

add: build releases for linux/arm64
  • [DH] Makefile

Merge pull request #421 from DejavuMoe/build/linux-arm64

Merge pull request #421 from DejavuMoe/build/linux-arm64

add: build releases for linux/arm64
  • [DH] Makefile

Bump golang.org/x/crypto to 0.17.0 (security)

Bump golang.org/x/crypto to 0.17.0 (security)

This fixes the following vulnerabilities, as reported by govulncheck:

Vulnerability #1: GO-2023-2402
    Man-in-the-middle attacker can compromise integrity of secure channel in
    golang.org/x/crypto
  More info: https://pkg.go.dev/vuln/GO-2023-2402
  Module: golang.org/x/crypto
    Found in: golang.org/x/crypto@v0.0.0-20200420104511-884d27f42877
    Fixed in: golang.org/x/crypto@v0.17.0
    Example traces found:
      #1: work/ssh-chat-1.10/sshd/client.go:42:33: sshd.ConnectShell calls ssh.Client.NewSession
      #2: work/ssh-chat-1.10/sshd/client.go:36:23: sshd.ConnectShell calls ssh.Dial
      #3: work/ssh-chat-1.10/sshd/net.go:49:2: sshd.SSHListener.handleConn calls ssh.DiscardRequests
      #4: work/ssh-chat-1.10/sshd/net.go:43:55: sshd.SSHListener.handleConn calls ssh.NewServerConn
      #5: work/ssh-chat-1.10/sshd/terminal.go:222:13: sshd.Terminal.listen calls ssh.Request.Reply
      #6: work/ssh-chat-1.10/sshd/client.go:46:2: sshd.ConnectShell calls ssh.Session.Close
      #7: work/ssh-chat-1.10/sshd/client.go:70:30: sshd.ConnectShell calls ssh.Session.SendRequest
      #8: work/ssh-chat-1.10/sshd/client.go:65:21: sshd.ConnectShell calls ssh.Session.Shell
      #9: work/ssh-chat-1.10/cmd/ssh-chat/cmd.go:243:14: ssh.main calls fmt.Fprintln, which eventually calls ssh.channel.Read
      #10: work/ssh-chat-1.10/sshd/terminal/terminal.go:954:17: terminal.Terminal.SetBracketedPasteMode calls io.WriteString, which calls ssh.channel.Write
      #11: work/ssh-chat-1.10/cmd/ssh-chat/cmd.go:243:14: ssh.main calls fmt.Fprintln, which eventually calls ssh.extChannel.Read

Vulnerability #4: GO-2022-0968
    Panic on malformed packets in golang.org/x/crypto/ssh
  More info: https://pkg.go.dev/vuln/GO-2022-0968
  Module: golang.org/x/crypto
    Found in: golang.org/x/crypto@v0.0.0-20200420104511-884d27f42877
    Fixed in: golang.org/x/crypto@v0.0.0-20211202192323-5770296d904e
    Example traces found:
      #1: work/ssh-chat-1.10/sshd/client.go:36:23: sshd.ConnectShell calls ssh.Dial
      #2: work/ssh-chat-1.10/sshd/net.go:43:55: sshd.SSHListener.handleConn calls ssh.NewServerConn

Vulnerability #5: GO-2021-0356
    Denial of service via crafted Signer in golang.org/x/crypto/ssh
  More info: https://pkg.go.dev/vuln/GO-2021-0356
  Module: golang.org/x/crypto
    Found in: golang.org/x/crypto@v0.0.0-20200420104511-884d27f42877
    Fixed in: golang.org/x/crypto@v0.0.0-20220314234659-1baeb1ce4c0b
    Example traces found:
      #1: work/ssh-chat-1.10/cmd/ssh-chat/cmd.go:122:19: ssh.main calls ssh.ServerConfig.AddHostKey

Vulnerability #6: GO-2021-0227
    Panic on crafted authentication request message in golang.org/x/crypto/ssh
  More info: https://pkg.go.dev/vuln/GO-2021-0227
  Module: golang.org/x/crypto
    Found in: golang.org/x/crypto@v0.0.0-20200420104511-884d27f42877
    Fixed in: golang.org/x/crypto@v0.0.0-20201216223049-8b5274cf687f
    Example traces found:
      #1: work/ssh-chat-1.10/sshd/net.go:43:55: sshd.SSHListener.handleConn calls ssh.NewServerConn
  • [DH] go.mod
  • [DH] go.sum

Merge pull request #427 from bsiegert/crypto

Merge pull request #427 from bsiegert/crypto

Bump golang.org/x/crypto to 0.17.0 (security)
  • [DH] go.mod
  • [DH] go.sum

Default to timestamp on.

Default to timestamp on.

The commit is coming from in the car!
  • [DH] chat/message/user.go

Default theme to mono.

Default theme to mono.

Seems like doing themes as map[string]*Theme would be
nicer than []Theme but maybe upstream knows something
I don't.
  • [DH] chat/message/theme.go

notificationSz→40

notificationSz→40

I should make this configurable, but while I'm on SPC, the page size
of 50 prevents me from paging through the notifications.
  • [DH] service/service.go

xpdf: Because the new one is busted.

xpdf: Because the new one is busted.
  • [DH] xpdf/.footprint
  • [DH] xpdf/Pkgfile
  • [DH] xpdf/README
  • [DH] xpdf/xpdf-3.02pl1.patch
  • [DH] xpdf/xpdf-3.02pl2.patch
  • [DH] xpdf/xpdf-3.02pl3.patch

URL has changed.

URL has changed.
  • [DH] xpdf/Pkgfile

xpdf: New build doesn't need the patches

xpdf: New build doesn't need the patches
  • [DH] xpdf/.footprint
  • [DH] xpdf/.md5sum
  • [DH] xpdf/Pkgfile
  • [DH] xpdf/xpdf-3.02pl1.patch
  • [DH] xpdf/xpdf-3.02pl2.patch
  • [DH] xpdf/xpdf-3.02pl3.patch

lesstif

lesstif
  • [DH] lesstif/.footprint
  • [DH] lesstif/.md5sum
  • [DH] lesstif/Pkgfile

mdk4

mdk4
  • [DH] mdk4/.footprint
  • [DH] mdk4/.md5sum
  • [DH] mdk4/Pkgfile

aircrack-ng: This git repo gets wild after dark.

aircrack-ng: This git repo gets wild after dark.
  • [DH] aircrack-ng/.footprint
  • [DH] aircrack-ng/.md5sum
  • [DH] aircrack-ng/Pkgfile

drawterm: Forgot the URL!

drawterm: Forgot the URL!
  • [DH] drawterm/Pkgfile

drawterm: Refreshingly simple compared to the other ports.

drawterm: Refreshingly simple compared to the other ports.
  • [DH] drawterm/.footprint
  • [DH] drawterm/.md5sum
  • [DH] drawterm/Pkgfile

cool-retro-term: I know it is cheesy. It is also fun.

cool-retro-term: I know it is cheesy.  It is also fun.

It is also worth installing just for the fonts.
  • [DH] cool-retro-term/.footprint
  • [DH] cool-retro-term/.md5sum
  • [DH] cool-retro-term/Pkgfile

Correct the path for SSD.

Correct the path for SSD.
  • [DH] devterm-a06/devterm-socat

Update md5sum.

Update md5sum.
  • [DH] devterm-a06/.md5sum
  • [DH] devterm-a06/Pkgfile

Add some basic scripts, somewhat Devterm-specific but not necessarily provided by...

Add some basic scripts, somewhat Devterm-specific but not necessarily provided by upstream.
  • [DH] devterm-extra/Pkgfile
  • [DH] devterm-extra/zramswap

xprintidle, my screen-dimmer script relies on it.

xprintidle, my screen-dimmer script relies on it.
  • [DH] xprintidle/Pkgfile

xprintidle fixes

xprintidle fixes
  • [DH] xprintidle/Pkgfile

barrier

barrier
  • [DH] barrier/Pkgfile

Correct the paths.

Correct the paths.
  • [DH] barrier/Pkgfile
  • [DH] devterm-a06/Pkgfile

Tweak how $PREFIX is set in barrier.

Tweak how $PREFIX is set in barrier.
  • [DH] barrier/Pkgfile

Manually install everything.

Manually install everything.
  • [DH] barrier/Pkgfile

Add a port so that I don't have to alter my .xinitrc to have a background.

Add a port so that I don't have to alter my .xinitrc to have a background.
  • [DH] qiv/Makefile.patch
  • [DH] qiv/Pkgfile

barrier working finally.

barrier working finally.
  • [DH] barrier/.footprint
  • [DH] barrier/.md5sum

Apparently, no wish, which I use, in contrib any more.

Apparently, no wish, which I use, in contrib any more.
  • [DH] tk/.footprint
  • [DH] tk/Pkgfile

Re-add tcl

Re-add tcl
  • [DH] tcl/.footprint
  • [DH] tcl/Pkgfile

barrier should stop dying on failed assertions, at least.

barrier should stop dying on failed assertions, at least.
  • [DH] barrier/Pkgfile

Should probably update qiv. Have not tested this yet.

Should probably update qiv.  Have not tested this yet.
  • [DH] qiv/Pkgfile

Add a little to default conky build.

Add a little to default conky build.

It is very convenient to have the wireless-tools built in.
  • [DH] conky/.footprint
  • [DH] conky/.md5sum
  • [DH] conky/Pkgfile
  • [DH] devterm-a06/.md5sum