Files
webgui/emhttp/plugins/dynamix/include/update.wireless.php
bergware 3fab0cabb6 Wireless: allow '$' character in username or password
- Need to escape the '$' character for PHP
2025-03-12 14:44:16 +01:00

24 lines
971 B
PHP

<?PHP
/* Copyright 2005-2025, Lime Technology
* Copyright 2012-2025, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
$open_ssl = "/usr/local/emhttp/webGui/scripts/open_ssl";
// encrypt username and password before saving (if existing)
if (!empty($_POST['USERNAME'])) $_POST['USERNAME'] = exec("$open_ssl encrypt \"".str_replace('$','\$',$_POST['USERNAME'])."\"");
if (!empty($_POST['PASSWORD'])) $_POST['PASSWORD'] = exec("$open_ssl encrypt \"".str_replace('$','\$',$_POST['PASSWORD'])."\"");
// update active wifi selection
foreach ($keys as $key => $val) if (isset($val['GROUP'])) $keys[$key]['GROUP'] = 'saved';
$keys[$section]['GROUP'] = 'active';
?>