4143 Commits

Author SHA1 Message Date
Armin Novak
d51fecc52d [core,aad] replace rdpTransport pointer with rdpContext
Only keep pointers to rdpContext so updates/changes to rdpTransport are
not leading to dangling pointers
2026-01-08 09:24:32 +01:00
Armin Novak
b56e17e611 [core,freerdp] fix race in freerdp_abort_connect_context
When aborting a connection only notify the client thread. Let
freerdp_disconnect handle sending server notifications.
2026-01-07 17:24:15 +01:00
Armin Novak
980284b86e [core,transport] fix format string warning 2026-01-07 15:59:39 +01:00
Armin Novak
c5131e72be [core,transport] check if critical section exists
When deleting the transport only lock critical sections if the creation
succeeded.
2026-01-07 15:42:57 +01:00
akallabeth
788d220ba5 [core,gateway] fix http response
* copy extracted strings, the buffer might get invalidated later
2025-12-29 18:50:11 +01:00
akallabeth
b160ea80e8 [mingw] fix type incompatibilities
The integer types with MINGW do not always match. Ensure the correct
32bit interger base type is used when passing pointers
2025-12-12 19:09:30 +01:00
akallabeth
d1ed8db7f0 [core,aad] log WINPR_JSON_ParseWithLength failures 2025-12-10 15:23:00 +01:00
akallabeth
20fc94edbc [core,listener] handle VMADDR_CID_ANY 2025-12-05 13:36:02 +01:00
akallabeth
2870ab7937 [core,transport] improve SSL error logging 2025-12-05 10:55:39 +01:00
akallabeth
c9b008637b [core,nla] split nla_encode_ts_credentials 2025-12-05 08:20:28 +01:00
David Fort
3f3a0426d3 Merge pull request #12042 from Devolutions/bug/smartcard_hw_enumerateCerts_off_by_one
[smartcardlogon] Fix off-by-one error in `smartcard_hw_enumerateCerts`
2025-12-04 17:58:07 +01:00
Richard Markiewicz
a56a50361b [smartcardlogon] Fix off-by-one error in smartcard_hw_enumerateCerts 2025-12-04 11:16:30 -05:00
David Fort
65bb6c59fc rdpear: handle basic NTLM commands and fix server-side
This patch adds the handling of basic NTLM commands. Because there's some mysterious
4 zero bytes after pickle header in Kerberos packets, not present in NTLM commands, the
patch also had to rework a bit the packet parsing / forging.

The patch also addresses a server-side bug when parsing supplemental creds, if the client
was sending an empty list, we were considering this as an error.

And finally we also implement the parsing of MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL.
This breaks the public API, anyway this was basically unused (as not parsed before) and
the previous API was wrong as what we receive is MSV1_0_REMOTE_SUPPLEMENTAL_CREDENTIAL
not MSV1_0_SUPPLEMENTAL_CREDENTIAL, so I guess the API breakage is ok.
2025-12-04 11:31:09 +01:00
Armin Novak
cd8d2e98b1 [core,nego] disable all enabled modes except the one requested
If a TYPE_RDP_NEG_FAILURE message is received, evaluate the failure code
and disable all modes except the one requested. This eliminates
unnecessary connection attempts with security modes not enabled.
2025-12-03 10:47:48 +01:00
akallabeth
c632a703df [core,input] Add debug log to keyboard state sync 2025-11-18 14:26:45 +01:00
Vladimir Berezniker
e03a623497 Fix(http): Use ContentLength for checking body existence
Corrected the condition introduced in e9890c3 PR (#11961)
2025-11-17 22:11:42 -05:00
akallabeth
197ac61dda [core,gateway] remove redundant casts 2025-11-11 12:35:33 +01:00
akallabeth
a57950c576 [gateway,arm] improve logging of arm responses 2025-11-07 11:22:09 +01:00
akallabeth
021356cb08 [gateway,http] change return type of http_response_get_body
the data is a string, so avoid unnecessary casts later on.
2025-11-07 11:21:13 +01:00
akallabeth
33097cbde4 Merge pull request #11984 from akallabeth/http-request-improve
Http request improvements
2025-11-07 10:55:33 +01:00
akallabeth
c69aaef8e8 [gateway,arm] improve logging and url detection 2025-11-07 09:51:25 +01:00
akallabeth
f232d2ad55 [gateway,websocket] make x-ms-user-agent optional 2025-11-07 09:51:21 +01:00
akallabeth
35ad10c345 [gateway,websocket] use a dynamic logger 2025-11-07 09:51:19 +01:00
akallabeth
32aa6d6e8f [gateway,http] improve header handling
In http context store header values in a hash table. This simplifies
handling of currently known and custom http headers.
2025-11-07 09:51:16 +01:00
akallabeth
af0d0cfb67 Revert "[core,gateway] improve arm transport"
This reverts commit 6c0a302083.
2025-11-07 08:32:48 +01:00
akallabeth
c978c64162 [core,gateway] improve response cookie handling
* extract cookies from responses
* append to http context for new requests
2025-10-31 11:36:19 +01:00
akallabeth
6c0a302083 [core,gateway] improve arm transport 2025-10-28 11:57:27 +01:00
akallabeth
08b00be412 [core,gateway] set user agent for websocket 2025-10-28 11:13:58 +01:00
akallabeth
e9890c3960 [core,gateway] add http_request_append_header 2025-10-28 11:13:55 +01:00
akallabeth
c8698a1b9c [core,settings] add new keys for gateway
Add missing settings:
* FreeRDP_GatewayHttpReferer
* FreeRDP_GatewayHttpUserAgent
* FreeRDP_GatewayHttpMsUserAgent
2025-10-28 11:13:52 +01:00
akallabeth
3975fe7c25 [core,timer] ensure all scheduled timers are handled
Timers might be delayed, so loop over all expired timers until none are
left.
2025-10-20 21:54:17 +02:00
akallabeth
e7b5ac7c73 [core,timer] fix reschedule interval
time was calculated in µs instead of ms.
@vokov0aa thank you for the hint
2025-10-10 10:23:57 +02:00
akallabeth
3cfcb4c9ca [core,tcp] fix a regression
with 2e5de43564 a bug was introduced
disabling the TCP buffering. revert that.
2025-10-06 18:59:46 +02:00
akallabeth
fc2ae4cf41 [core,codecs] add stringify helper
add freerdp_codec_id_to_str to get a string representation of a given
codec id
2025-10-06 08:41:18 +02:00
Armin Novak
9fc79f7e90 [core,rdstls] improve logging 2025-10-02 15:59:16 +02:00
Armin Novak
56dc5efe1e [core,rdstls] improve return code mapping 2025-10-02 15:18:47 +02:00
Armin Novak
ad8780c823 [core,test] fix TestSettings
Fill values with base64 encoded random data. Some fields are strings
that need to be valid utf-8.
2025-10-01 09:38:47 +02:00
Armin Novak
82b86babe5 [common,test] test freerdp_target_net_addresses_resize
Add a unit test to check the expected behaviour of
freerdp_target_net_addresses_resize matches the implementation.
2025-09-30 16:05:36 +02:00
akallabeth
611dd58bc7 [core,transport] fix inverted condition 2025-09-29 11:56:51 +02:00
akallabeth
6c5fc3623e [core,arm] fix TargetNetAddress size and checks
* Allocate for maximum expected values
* Add checks during parsing to not exceed limits
2025-09-29 11:25:11 +02:00
akallabeth
9677931343 [core,arm] fix domain setting
While AzureAD seems to be required for many setups, some need an empty
domain (or maybe a different all together?)
So only provide a sane default and allow user override.
2025-09-29 10:17:01 +02:00
akallabeth
c6356ef836 [core,nego] add helper nego_rdp_neg_fail_str 2025-09-26 13:14:50 +02:00
akallabeth
74648eb3a9 [c,standard] use C99 inline 2025-09-26 11:29:26 +02:00
akallabeth
1baa721961 [core] fix const correctness
Make function arguments const if possible.
2025-09-26 11:18:57 +02:00
akallabeth
53d63b3120 [core,arm] add TARGET_BOOTING error code
Propagate the error code for a VM still booting to client.
2025-09-26 10:13:46 +02:00
Armin Novak
fe31f84835 [core,gateway] fix cast warning 2025-09-25 16:17:09 +02:00
Armin Novak
f91cb45329 [core,wst] handle unexpected HTTP status return
Set last error according to received HTTP status
2025-09-25 11:19:09 +02:00
Armin Novak
b5b6a4b7e7 [core,gateway] make HTTP status codes UINT16 2025-09-25 11:08:53 +02:00
Armin Novak
71fb1aaa8e [core,gateway] on *_connect reset last error
A previous gateway connect might have failed, so reset any pending
error.
2025-09-25 11:08:46 +02:00
Armin Novak
7531a7284c [core,rdstls] implement autoreconnectcookie
Implement rdstls_write_authentication_request_with_cookie to allow
authentication with redirection cookie
2025-09-24 14:01:15 +02:00