Commit Graph

889 Commits (e3089e9417a201f05f718b9061669c71a8826e66)

Author SHA1 Message Date
openvpn-inc-ci e3089e9417
Merge 3098b99a43 into d31c391b6b 2025-05-05 16:26:56 +02:00
OpenVPN Renovate 3098b99a43 Migrate config renovate.json 2025-05-05 14:26:54 +00:00
Lev Stipakov d31c391b6b Keep PLAP dialog alive by simulating user activity
Add a timer to periodically simulate mouse movement
using SendInput, preventing the pre-logon UI from being
dismissed due to inactivity during mobile QR code authentication.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2025-04-24 08:36:03 -07:00
Selva Nair 3e4adfa49e Hide password reveal eye icon when no response box is shown
When CR_TEXT or dynamic CR prompt is triggered with
'response not required' ('R' not present in flags), we hide the response
box, but not the password reveal eye icon. Fix it.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2025-04-07 12:12:59 +03:00
bovirus b8f945c48b Italian language update 2025-04-07 09:51:15 +02:00
Lev Stipakov 034ecedaa8 Add QR dialog to all resource files
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2025-04-04 18:51:26 -07:00
Lev Stipakov d8249daf8f PLAP: support for webauth
Instead of opening the browser window in PLAP context (which is insecure),
display a dialog with QR code and ask user to scan it on mobile device.

QR code generation is taken from MIT-licensed library:

  https://github.com/nayuki/QR-Code-generator/blob/master/c/qrcodegen.c

Before I tried vcpkg libqrencode package but gave up after
10 mins of dependencies building (it requires msys2 etc).

Note that you need to add

  setenv IV_SSO webauth

to PLAP profile to make it work.

Fixes: https://github.com/OpenVPN/openvpn-gui/issues/687

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2025-04-04 18:51:26 -07:00
Lev Stipakov 2242c1cca4 Use stdbool.h for bool
No need to define own bool/true/false values.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2025-04-04 18:51:26 -07:00
Yuriy Darnobyt 5880925331 Bump version to 11.52.0.0
Signed-off-by: Yuriy Darnobyt <yura.darnobyt@openvpn.net>
2025-04-02 14:51:38 +03:00
Lev Stipakov 068ed823bd Use correct %TEMP% directory for log file
C:\\windows\\Temp\\ has been write-protected since a while,
so instead of hardcoding the (wrong) path, use GetTempPath().

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2025-03-28 13:30:31 +02:00
Selva Nair b3849327f6 Disable config in menu listing if its ovpn file becomes inaccessible
Since the introduction of persistent connections, we
no longer recreate the entire config menu but only add newly
added connection profiles during each rescan. This leaves
any deleted configs actively displayed in the menu until the
GUI is restarted.

Improve this situation by graying out entries corresponding to
profiles not readable from file system. If the file reappears,
the item gets automatically enabled again.

Also, if the corresponding connection is active, the item is not
grayed out to allow the user to disconnect or reconnect it.
Otherwise the corresponding OpenVPN core process will hang around
with no way to control it from the GUI. Here "active" includes
those on management-hold in case of persistent connections, as
those can be started even if the underlying config file has
gone missing.

Addresses github issue #729

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2025-03-28 12:06:36 +02:00
Frank Lichtenheld 5f844605ee echo.c: Avoid -Wsign-compare with MinGW on 32bit systems
echo.c:221:72: error: comparison of integer expressions of
different signedness: ‘long unsigned int’ and
‘time_t’ {aka ‘long int’} [-Werror=sign-compare]

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld 91b0b1e5be tray.c: Avoid -Waddress with MinGW
tray.c:783:36: error: the comparison will always
evaluate as ‘true’ for the pointer operand [...]
must not be NULL [-Werror=address]

True.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld 39c31aef98 openvpn.c: Avoid -Waddress warnings with MinGW
This happens on newer MinGW versions:
openvpn.c:176:19: error: the comparison will always
evaluate as ‘false’ for the pointer operand in
‘flags + -1’ must not be NULL [-Werror=address]

Strictly speaking this is a false positive, but
the pointer handling is a bit weird, so make the
code more straight-forward.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld 528df5e259 configure: For MinGW build enable -Werror
But avoid -Wcast-function-type (from -Wextra)
since that is not useful for code using
GetProcAddress.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld 2721540f89 Replace _wfopen with _wfopen_s
Avoid
warning C4996: '_wfopen': This function or variable may be unsafe

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld ec77d99c40 Replace usages of _snwprintf
Avoid
warning C4996: '_snwprintf': This function or variable may be unsafe

Also makes the code generally simpler.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
Frank Lichtenheld 913641ec41 openvpn.c: Avoid compiler warnings for sscanf with MinGW
openvpn.c:1709:29: warning: ISO C does not support the 'I'
 scanf flag [-Wformat=]
openvpn.c:1709:34: warning: format ‘%u’ expects argument
 of type ‘unsigned int *’, but argument 3 has type
 ‘long long unsigned int *’ [-Wformat=]

Switch to using portable identifiers.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-02-18 14:03:22 +01:00
OpenVPN Renovate ff0af59042 Update vcpkg digest to d5ec528 2025-02-17 15:04:08 +01:00
Frank Lichtenheld 4da342c351 Add input file for git blame --ignore-revs-file
This allows one to ignore the project-wide reformats
for the purposes of git blame.

File comment copied from openvpn.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-20 14:45:40 +01:00
OpenVPN Renovate 9104e116ac Update dependency ubuntu to v24 2025-01-20 14:02:03 +01:00
Frank Lichtenheld 4318e31c5a GHA: Switch to clang-format for format check
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-20 13:39:57 +01:00
Frank Lichtenheld 054996c47a Switch to pre-commit to enforce formatting
Do not use the old uncrustify hook anymore.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-20 13:39:57 +01:00
Frank Lichtenheld d2bcb940dc Reformat the whole source code with clang-format
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-20 13:39:57 +01:00
Frank Lichtenheld 844c060acc Add .clang-format file
This tries to capture the "OpenVPN" format as
good as possible.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-20 13:39:57 +01:00
OpenVPN Renovate 57f9cad58a Update github actions to v4 2025-01-17 16:28:56 +01:00
Frank Lichtenheld 02f75b65b5 Configure renovate
Copies applicable parts of the config for openvpn3.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-16 14:42:59 +01:00
OpenVPN Renovate d10ad640cf Add renovate.json 2025-01-16 14:42:59 +01:00
Frank Lichtenheld 427030aec0 GHA: Clean up mingw build
- Remove useless caching. Currently the build doesn't
  need any dependencies.

- Remove useless sub-directory

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-16 10:04:35 +02:00
Frank Lichtenheld 716b391b2e GHA: Update vcpkg commit to something current
Last update was in 2023 and this lead to build-failures
now.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-16 10:04:35 +02:00
Frank Lichtenheld 32f2c807ee Bump version to 11.51.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2025-01-15 12:00:39 +01:00
Silent 02137dd657 Fix a Y2038 bug by replacing Int32x32To64 with regular multiplication
Int32x32To64 macro internally truncates the arguments to int32,
while time_t is 64-bit on most/all modern platforms.
Therefore, usage of this macro creates a Year 2038 bug.
2024-12-31 13:05:26 -05:00
Selva Nair 3ba02de7c6
Fix position of the tray icon info tip when the taskbar is at the top of the screen (#711)
* Position tooltip below the taskbar when it is at the top of the screen

Fixes github issue #710

Signed-off-by: Selva Nair <selva.nair@gmail.com>

* Update CHANGES.rst

Signed-off-by: Selva Nair <selva.nair@gmail.com>

---------

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-11-18 20:39:51 +05:30
justwho 1a653641cc
Update openvpn-gui-res-zh-hans.rc (#705)
* Update openvpn-gui-res-zh-hans.rc
2024-09-21 20:04:17 +05:30
bovirus a140b5201f Update Italian language 2024-09-16 10:56:42 +03:00
Selva Nair c4d11390fd Copy the checkbox and strings in previous commit to all language files
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-09-16 10:35:01 +03:00
Selva Nair be00b33c92 Add a global option to always prompt for OTP
Add a checkbox to the general settings menu
to always prompt for OTP when prompting for password
even if no static-challenge request is received from
the management interface.

The response is appeneded to the password using the
concatenation format and submitted to the management interface.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-09-16 10:35:01 +03:00
Selva Nair 5494ebb408 Parse new static-challenge format option from management interface
Parse the flag in SC:<flag>,TEXT directive for static-challenge,
and enable the option to concatenate password and response
if indicated in flag.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-09-10 15:54:33 +02:00
Selva Nair 927953021a Support concatenating response with password
Static challenge response and password are optionally
concatenated and submitted instead of using the SCRV1
protocol. The code is activated in the next commit.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-09-10 15:54:33 +02:00
Selva Nair 2a68580dd9
Add higher resolution eye icons (#698)
20, 24 and 32 bit eye and eye-stroke icons added.

Fixes issue #697

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-07-22 21:20:21 +05:30
Yuriy Darnobyt 5d9c4662d8 Bump version to 11.50.0.0
Signed-off-by: Yuriy Darnobyt <yura.darnobyt@openvpn.net>
2024-07-18 11:48:52 +03:00
bovirus e7ad359568
Update Italian language (#696) 2024-07-18 01:22:51 +05:30
Selva Nair f20062edd5 Update copyright year
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-07-15 18:45:02 +02:00
Frank Lichtenheld 6794097462 Bump version to 11.49.0.0
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2024-06-20 11:45:20 +02:00
Selva Nair 4547dd95fc Validate the service pipe to avoid connecting to a bogus pipe
If an attacker with SeImeprsonatePrivilege manages to create a
namedpipe server with a name matching that used by the "Interactive
Service", the GUI connecting to it could allow the attacker to
impersonate the GUI user.

Fix by validating the service pipe by comparing the pid of the pipe
server with that of the "Interactive Service".

Note: GetNamedPipeServerProcessId() returns the pid of the process
that created the first instance of the pipe. So, this patch only
guards against a rogue pipe instance created before the service
has started. This has to work in combination with a patch for the
service that disallows creation of additional pipe instances when
the service is running.

CVE: CVE-2024-4877
Reported by: Zeze with TeamT5 <zeze7w@gmail.com>

Acked-by: Lev Stipakov <lstipakov@gmail.com>
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-06-19 16:46:41 +02:00
Selva Nair 83034c410f Rename artifacts to avoid overwrite
This adds a suffix _release or _asan to the zip file name
in place of _Object.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-04-22 02:16:29 +05:30
Selva Nair 60f4c8321c Update CHANGES.rst
Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-04-18 12:04:50 +03:00
Selva Nair fdf457d3a6 Fix off-by-one error in escape_string()
Github: fixes openvpn/openvpn-gui#548

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-04-18 12:04:26 +03:00
Yuriy Darnobyt 9c0c488890 Bump version to 11.48.0.0
Signed-off-by: Yuriy Darnobyt <yura.darnobyt@openvpn.net>
2024-03-20 11:50:04 +02:00
Selva Nair d1756f068e Position tray tooltip above the taskbar
Use Shell_NotifyGetRect to find the icon location and place the
tip window a fixed distance above/below it.

It appears GUID_NULL used for above is not pulled in by shellapi.h.
Define locally when absent.

Also add TTF_RTLREADING for RTL languages. How to right justify
as well in this case is unclear.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
2024-02-14 20:27:29 +05:30