Skip to content

Commit

Permalink
Replace colons in unix sockets with underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed Jun 24, 2022
1 parent 2d16c2d commit f7af79e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sshmuxer/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net"
"os"
"strconv"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -89,7 +90,7 @@ func handleRemoteForward(newRequest *ssh.Request, sshConn *utils.SSHConnection,
}
}

tmpfile, err := ioutil.TempFile("", sshConn.SSHConn.RemoteAddr().String()+":"+stringPort)
tmpfile, err := ioutil.TempFile("", strings.ReplaceAll(sshConn.SSHConn.RemoteAddr().String()+":"+stringPort, ":", "_"))
if err != nil {
log.Println("Error creating temporary file:", err)

Expand Down

0 comments on commit f7af79e

Please sign in to comment.