mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-27 22:46:37 +00:00
Make sure to validate the client's ip address
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"github.com/bolkedebruin/rdpgw/client"
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
@@ -96,7 +97,7 @@ func (h *Handler) Process(ctx context.Context) error {
|
||||
_, cookie := readCreateTunnelRequest(pkt)
|
||||
if h.VerifyTunnelCreate != nil {
|
||||
if ok, _ := h.VerifyTunnelCreate(ctx, cookie); !ok {
|
||||
log.Printf("Invalid PAA cookie received")
|
||||
log.Printf("Invalid PAA cookie received from client %s", client.GetClientIp(ctx))
|
||||
return errors.New("invalid PAA cookie")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user