Skip to content

Commit

Permalink
plugins/wrms/update.php: escape api data, before pushing to clients
Browse files Browse the repository at this point in the history
  • Loading branch information
euven committed Oct 3, 2014
1 parent 091e8b1 commit efda079
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/wrms/update.php
Expand Up @@ -85,6 +85,12 @@
if (!isset($lastwrs[$seen]) || $row != $lastwrs[$seen]) {
// Update $lastwrs and trigger sending of new version
$send = true;
foreach ($row as $key => $val) {
if (is_string($val)) {
// escape any nasties
$row->{$key} = htmlspecialchars($val, ENT_QUOTES | ENT_SUBSTITUTE);
}
}
$lastwrs[$seen] = $row;
}

Expand Down

0 comments on commit efda079

Please sign in to comment.