RaspAP / raspap-webgui

Simple wireless AP setup & management for Debian-based devices
https://raspap.com/
GNU General Public License v3.0
4.47k stars 792 forks source link

[Bug]: ovpn config filenames with brackets doesn't work #1661

Closed jimmyjones2 closed 1 month ago

jimmyjones2 commented 1 month ago

Code of Conduct

Issue reporting checklist

Operating System

Raspberry Pi OS (64-bit) Lite Bookworm

Quick install or Manual setup?

Quick install

Onboard wireless chipset or external adapter?

Onboard wireless chipset

Hardware

Raspberry Pi Zero W

RaspAP version

3.1.3 (Latest)

Other software or services running with RaspAP?

No other software

Contact details (optional)

No response

Bug description

I've tried to upload openvpn config file profile-openvpn(6).ovpn but this caused errors in the UI and the config wasn't added.

It looks as if filenames are not escaped/quoted in the shell commands within the PHP causing the failure, e.g. https://github.com/RaspAP/raspap-webgui/blob/master/includes/openvpn.php#L131 (and another few instances within the same file)

Steps to reproduce

Upload openvpn profile with filename profile-openvpn(6).ovpn

Screenshots

No response

Additional context

No response

Relevant log output

No response

billz commented 1 month ago

@jimmyjones2 thanks for reporting