mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
only call stripslashes if it is not compressed, compressed is already protected against munging by snmpd (#15953)
This commit is contained in:
committed by
GitHub
parent
19344f0584
commit
03e9b52295
@@ -470,10 +470,15 @@ function json_app_get($device, $extend, $min_version = 1)
|
|||||||
if (Debug::isVerbose()) {
|
if (Debug::isVerbose()) {
|
||||||
echo 'Decoded Base64+GZip Output: ' . $output . "\n\n";
|
echo 'Decoded Base64+GZip Output: ' . $output . "\n\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$output = stripslashes($output);
|
||||||
|
if (Debug::isVerbose()) {
|
||||||
|
echo 'Output post stripslashes: ' . $output . "\n\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// turn the JSON into a array
|
// turn the JSON into a array
|
||||||
$parsed_json = json_decode(stripslashes($output), true);
|
$parsed_json = json_decode($output, true);
|
||||||
|
|
||||||
// improper JSON or something else was returned. Populate the variable with an error.
|
// improper JSON or something else was returned. Populate the variable with an error.
|
||||||
if (json_last_error() !== JSON_ERROR_NONE) {
|
if (json_last_error() !== JSON_ERROR_NONE) {
|
||||||
|
Reference in New Issue
Block a user