Skip to content

Add interface validation and improve shell argument escaping - #1833

Merged
billz merged 1 commit into
RaspAP:masterfrom
no-sec-marko:fix/rce-hostapd
Apr 25, 2025
Merged

Add interface validation and improve shell argument escaping#1833
billz merged 1 commit into
RaspAP:masterfrom
no-sec-marko:fix/rce-hostapd

Conversation

@no-sec-marko

Copy link
Copy Markdown
Contributor
  • Introduced validateInterface() to ensure only existing network interfaces are used
  • Used escapeshellarg() for user-supplied interfaces in shell commands (iw, iwgetid)
  • Replaced direct usage of $_POST['interface'] with validated fallback to RASPI_WIFI_AP_INTERFACE
  • Improved code readability by reducing redundant assignments

- Introduced validateInterface() to ensure only existing network interfaces are used
- Used escapeshellarg() for user-supplied interfaces in shell commands (iw, iwgetid)
- Replaced direct usage of $_POST['interface'] with validated fallback to RASPI_WIFI_AP_INTERFACE
- Improved code readability by reducing redundant assignments
@no-sec-marko

Copy link
Copy Markdown
Contributor Author

see #1834

@billz

billz commented Apr 24, 2025

Copy link
Copy Markdown
Member

@no-sec-marko many thanks for the PR!

@billz
billz merged commit 36610ac into RaspAP:master Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants