Skip to content

Commit

Permalink
[configuration] Use unsafeInsert/unsafeUpdate for saving values (#8759)
Browse files Browse the repository at this point in the history
The values get double-escaped when modified now if they contain
HTML. Use unsafe variants of database calls so that the values to
not get modified when re-saved.

Fixes #8748
  • Loading branch information
driusan authored Jun 12, 2023
1 parent 690b8a8 commit f768560
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/configuration/ajax/process.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
}
// Update the config setting to the new value.
$DB->update(
$DB->unsafeUpdate(
'Config',
['Value' => $value],
['ID' => $key]
Expand Down Expand Up @@ -108,7 +108,7 @@
}
}
// Add the new setting
$DB->insert(
$DB->unsafeInsert(
'Config',
[
'ConfigID' => $ConfigSettingsID, // FK to ConfigSettings.
Expand Down

0 comments on commit f768560

Please # to comment.