Skip to content

Commit

Permalink
Fixed parameter parsing in change_device.php (#5559)
Browse files Browse the repository at this point in the history
explode parses each parameter into more than just 2 parts, if the string contains more than one "=" character.

Can be fixed by limiting explode to output just two elements, then it automatically stops at the first "=" sign and keeps the rest of the string behind it untouched.
  • Loading branch information
bernisys authored Nov 12, 2023
1 parent 81585a4 commit 53b6968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli/change_device.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
$overrides = array();
foreach($parms as $parameter) {
if (strpos($parameter, '=')) {
list($arg, $value) = explode('=', $parameter);
list($arg, $value) = explode('=', $parameter, 2);
} else {
$arg = $parameter;
$value = '';
Expand Down

0 comments on commit 53b6968

Please sign in to comment.