Skip to content

Commit

Permalink
bugfix: impose no message size limit, use same version of PAKE in sen…
Browse files Browse the repository at this point in the history
…der and receiver (#29)

- Remove per-message size limit

- Sender and receiver had different versions of schollz/pake. The old
version in the receiver was broken in go 1.19
(golang/go#50974)

-  Update call to deprecated BubbleTea function

- Upgrade other packages
  • Loading branch information
ZinoKader authored Dec 23, 2022
1 parent 3ca2f6b commit 1e9d909
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 130 deletions.
2 changes: 1 addition & 1 deletion cmd/portal/receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func handleReceiveCommand(password string) {

receiver := receiver.New(fmt.Sprintf("%s:%d", addr, port), password)

if err := receiver.Start(); err != nil {
if _, err := receiver.Run(); err != nil {
fmt.Println("Error initializing UI", err)
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/portal/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func handleSendCommand(fileNames []string) {
addr := viper.GetString("rendezvousAddress")
port := viper.GetInt("rendezvousPort")
sender := senderui.New(fileNames, fmt.Sprintf("%s:%d", addr, port))
if err := sender.Start(); err != nil {
if _, err := sender.Run(); err != nil {
fmt.Println("Error initializing UI", err)
os.Exit(1)
}
Expand Down
69 changes: 35 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,42 @@ go 1.18

require (
github.com/atotto/clipboard v0.1.4
github.com/charmbracelet/bubbles v0.11.0
github.com/charmbracelet/bubbletea v0.21.0
github.com/charmbracelet/lipgloss v0.5.0
github.com/charmbracelet/bubbles v0.14.0
github.com/charmbracelet/bubbletea v0.23.1
github.com/charmbracelet/lipgloss v0.6.0
github.com/docker/go-connections v0.4.0
github.com/klauspost/pgzip v1.2.5
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.4.0
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.7.2
github.com/spf13/cobra v1.6.1
github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
github.com/testcontainers/testcontainers-go v0.13.0
go.uber.org/zap v1.21.0
go.uber.org/zap v1.24.0
nhooyr.io/websocket v1.8.7
)

require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
golang.org/x/text v0.5.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/Microsoft/hcsshim v0.8.23 // indirect
github.com/aymanbagabas/go-osc52 v1.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
github.com/charmbracelet/harmonica v0.2.0 // indirect
github.com/containerd/cgroups v1.0.1 // indirect
Expand All @@ -52,44 +53,44 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/moby/sys/mount v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.5.0 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect
github.com/muesli/cancelreader v0.2.0 // indirect
github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/termenv v0.13.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
google.golang.org/grpc v1.46.2 // indirect
google.golang.org/protobuf v1.28.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/net v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e // indirect
google.golang.org/grpc v1.50.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

require (
github.com/containerd/console v1.0.3 // indirect
github.com/gorilla/mux v1.8.0
github.com/klauspost/compress v1.15.6 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/muesli/ansi v0.0.0-20221106050444-61f0cd9a192a // indirect
github.com/muesli/reflow v0.3.0
github.com/schollz/pake v1.1.1
github.com/schollz/pake/v3 v3.0.4
github.com/schollz/pake/v3 v3.0.5
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce
github.com/tscholl2/siec v0.0.0-20210707234609-9bdfc483d499 // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c // indirect
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
golang.org/x/crypto v0.4.0
golang.org/x/exp v0.0.0-20221217163422-3c43f8badb15
golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1e9d909

Please sign in to comment.