Commit Graph

15759 Commits

Author SHA1 Message Date
akallabeth
d9ff38bcd7 Fixed #7821: Revert length check broken by #7796 2022-04-23 10:10:09 +02:00
akallabeth
aa6ca6aa40 Do not use Stream_CheckAndLogRequiredLength for optional checks
clear codec does not require these bytes to be available, so do
not log such checks
2022-04-23 10:10:09 +02:00
akallabeth
74c1a006e9 Fixed format string for Stream_CheckAndLogRequiredLength
__LINE__ requires %d and not %PRIuz
2022-04-23 10:10:09 +02:00
akallabeth
19de452f9c Cleaned up ntlm_fetch_ntlm_v2_hash 2022-04-22 15:30:23 +02:00
Armin Novak
8b011b6c3b Use define for japanese keyboard type 2022-04-22 10:20:09 +02:00
Armin Novak
1f9916eba2 Added settings comparison function 2022-04-22 10:20:09 +02:00
2fly2
83aaa4e575 fix x11 black RAIL window when connect to server 2019
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-04-22 10:16:49 +02:00
Ely Ronnen
934fbe37d1 fix parntheses syntax error 2022-04-21 08:29:27 +02:00
Armin Novak
9036b83e87 Fixed setting GatewayHostname 2022-04-20 15:24:45 +02:00
Armin Novak
a2a81f1f27 Fixed buildconfig.h generation 2022-04-20 15:24:45 +02:00
akallabeth
f99491c354
Fixed /gt:xxx settings (#7808)
* Disable websocket support with RPC
* Use settings getter/setter
2022-04-19 14:47:57 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
akallabeth
37d0a9e2b7 Assert function pointers in proxy 2022-04-15 12:13:03 +02:00
akallabeth
eda7cf785b Fixed compilation warnings, added some asserts 2022-04-15 09:06:09 +02:00
David Fort
63d0d3e4cf proxy: rework proxy channel treatments for statefull drdynvc
The rework introduce a stateful dynamic channel treatment, so that we can take early decisions
for data packet (dropping all the current packet or pass it), but also reassemble important
packets like channel creation.
2022-04-15 09:06:09 +02:00
David Fort
f232562d8b smartcard: take in account the module path for listing smartcards
The PKCS1 module was taken only for the kerberos part.
Also make as exported the winpr_NCryptOpenStorageProviderEx function.
2022-04-15 09:06:09 +02:00
akallabeth
752ac3b479
Fix #7793: Do not expose internal input API (#7794)
* Fixed GetFileInformationByHandle initializers

* Fix #7793: Do not expose internal input API

Slow-Path input uses UINT16 for scancodes on wire, but only the
lower byte is actually used. (the extended fields are sent in
keyboardFlags field)
Hide this implementation detail and adjust the API to use UINT8
for the code instead just like the corresponding Fast-Path PDU

* Added a warning for problematic slow path keyCodes
2022-04-13 09:34:05 +02:00
David Fort
a152dec687 proxy: correctly use the RemoteApp flag
The flag was forcing the remoteApp usage when set, while all the other equivalent
flags just enable the feature. This patch fixes that, so now setting RemoteApp = TRUE
just enables the front client to do remoteApps.
2022-04-12 08:05:28 +02:00
Stefan Koell
df3737b085 wfreerdp-client: make keyboard work when /parent-window is provided 2022-04-10 20:10:54 +02:00
Stefan Koell
e48d3e509a winpr: fix cache assertion before it's been created 2022-04-08 11:26:29 +02:00
Iordan Iordanov
511444a65e Switch to official OpenSSL Download location and away from github.
One of the benefits is that this adds support for building with OpenSSL 3.0 versions without breaking support for building with 1.1.1.

As part of the work, the assumption that there is an /archive/ in the download path is removed.

Furthermore, cmake modules for finding OpenSSL are updated in order to support 3.0.
2022-04-07 09:10:40 +02:00
Armin Novak
edcb8284e7 Fixed #7745: Progressive surface cleanup 2022-04-06 10:32:43 +02:00
Armin Novak
66c7228643 Fixed version mismatch in ffmpeg h264 2022-04-06 10:25:41 +02:00
Armin Novak
944e14ab82 Fixed mac peer context functions 2022-04-06 10:25:41 +02:00
akallabeth
19173a3c6b Fixed removed #endif 2022-04-06 10:25:41 +02:00
akallabeth
e647d3aa83 Additional error checks for ffmpeg h264 backend 2022-04-06 10:25:41 +02:00
akallabeth
0a9c02b1ad Always set sys->packet 2022-04-06 10:25:41 +02:00
akallabeth
f4cb7b9877 Added FFMPEG h264 asserts 2022-04-06 10:25:41 +02:00
Armin Novak
9d5e7b0d38 Fixed broken stream check 2022-04-06 08:58:32 +02:00
Armin Novak
d49f744526 Unify stream positioning on fastpath updates 2022-04-06 08:58:32 +02:00
Armin Novak
974c700977 Fixed memory leak in YUV 2022-04-06 08:58:32 +02:00
Armin Novak
24997387a4 Fixed missing capacity checks in fastpath 2022-04-06 08:58:32 +02:00
Adrian Vollmer
1adb263813 Updated doc regarding proxy URL syntax 2022-04-05 09:22:48 +02:00
Adrian Vollmer
bfea66d5e9 Set default ports for http and socks proxies 2022-04-05 09:22:48 +02:00
Adrian Vollmer
2f1003c257 Move function declaration before first use 2022-04-05 09:22:48 +02:00
Adrian Vollmer
167a29a41f Move function back to original position
This is merely done so that the diff looks nicer.
2022-04-05 09:22:48 +02:00
Adrian Vollmer
a19de01fe3 Applied requested changes
* Add `proxy_utils.h`
* Move `proxy_parse_uri()` back to `proxy.c`
* Copy function `value_to_int` to `proxy.c`
* Remove memory leak (`uri_copy`)
2022-04-05 09:22:48 +02:00
Adrian Vollmer
28923ddd75 Fixed parsing of https_proxy environment variable
A proxy URI was parsed both in the function `proxy_read_environment()` in
`libfreerdp/core/proxy.c` and in the function
`freerdp_client_settings_parse_command_line_arguments()` in
`client/common/cmdline.c`. But only the latter was taking into account
that the URI can contain a user and password, which made it impossible
to use a proxy with authentication by just using an environment
variable like `https_proxy`.

The function `proxy_parse_uri()` in `libfreerdp/core/proxy.c` was
clearly not parsing the optional username and password.

This commit moves the code from `client/common/cmdline.c` to
`libfreerdp/common/settings.c` into a function `proxy_parse_uri()` so
redundant code is avoided. This function is then called in both
instances where a proxy URI is parsed.

Some minor adjustment were made to the code, so the `WLog_INFO()`
statement at the end works in both cases, where credentials were either
provided or not. Also, some error messages were added or clarified.

If the parsing of the environment variable fails, we ignore it entirely
(with a warning) and proceed.
2022-04-05 09:22:48 +02:00
akallabeth
6c0938f752 Relaxed parser, fix a bug in LogonInfoV2 length
The length should include the padding, but even ms servers send it
without.
2022-03-31 16:15:27 +02:00
akallabeth
1378c8e671
Fixed #7753: Step calculation in YUV decoder (#7758)
* Fixed #7753: Step calculation in YUV decoder

* Fixed rectangle_is_empty

* Added rectangle intersection check in YUV decoder

* Skip intersecting rectangles in YUV decoder

* Refactored YUV work object handling

* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments

* Pass yuv_context_reset result from h264_context_reset

* Reset PTP_WORK buffer to NULL after use
2022-03-29 13:55:52 +02:00
Pascal Nowack
e68897a694 X11/cliprdr: Clear selection requests, when they become invalid
When a FormatDataRequest by xfreerdp is answered with the
CB_RESPONSE_FAIL flag, then the request was answered, but xfreerdp does
not mark it as answered, by leaving the request as pending.
This results in non-functional copy-paste actions, when copying
something from the server side, after the failed request.
A similar situation can happen, when a new FormatList is received,
while there is a pending FormatDataRequest.

Fix these situations by clearing the pending request, when a form of an
answer, either via CB_RESPONSE_FAIL flag or via new FormatList, is
received.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/7757
2022-03-29 13:39:07 +02:00
Armin Novak
eebb0c59b0 Removed rdpRdp instance pointer 2022-03-29 12:13:37 +02:00
Pascal Nowack
5b5582c9d5 freerdp/constants: Conform osMinorType values to documentation
The OSMINORTYPE_NATIVE_WAYLAND value does not officially exist in
[MS-RDPBCGR].
Its value also is the one for Windows RT.

Fix this situation, by introducing the os minor type
OSMINORTYPE_WINDOWS_RT with its correct value and by choosing a
different value for OSMINORTYPE_NATIVE_WAYLAND, as that value does not
exist officially.
2022-03-29 10:30:12 +02:00
Ely Ronnen
29fcfdce03 building android client modules abi based on if the native modules exists in jniLibs 2022-03-28 19:30:12 +02:00
eronnen
be07eb6f35 moving android client build to be part of aFreeRDP.apk gradle build 2022-03-28 19:30:12 +02:00
Armin Novak
037084abd5 Fix #7754 remove last newline in convert_filedescriptors_to_file_list 2022-03-28 16:21:27 +02:00
Armin Novak
22194a2ec6 Fixed missing field read. 2022-03-28 15:52:59 +02:00
Armin Novak
29b8298ff8 Fixed windows build (_snpnrintf) 2022-03-28 15:52:59 +02:00
Armin Novak
42ddb0898e Fixed NTLM flag handling
* NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED and NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED
* Problem with clients not supporting NTLMSSP_NEGOTIATE_LM_KEY
* Improve logging
2022-03-28 15:52:59 +02:00
akallabeth
47bd162065 Added function sspi_SetAuthIdentityW 2022-03-28 15:52:59 +02:00