mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2025-08-17 22:13:50 +02:00
Use encryption for cookies
This commit is contained in:
parent
46e1e9b9f4
commit
5de3767e70
5 changed files with 27 additions and 24 deletions
|
@ -100,7 +100,7 @@ func (h *Handler) Process() error {
|
|||
_, cookie := readCreateTunnelRequest(pkt)
|
||||
if h.VerifyTunnelCreate != nil {
|
||||
if ok, _ := h.VerifyTunnelCreate(h.Session, cookie); !ok {
|
||||
log.Printf("Invalid PAA cookie: %s", cookie)
|
||||
log.Printf("Invalid PAA cookie received")
|
||||
return errors.New("invalid PAA cookie")
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,6 @@ func readCreateTunnelRequest(data []byte) (caps uint32, cookie string) {
|
|||
r.Read(cookieB)
|
||||
cookie, _ = DecodeUTF16(cookieB)
|
||||
}
|
||||
log.Printf("Create tunnel caps: %d, cookie: %s", caps, cookie)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue