Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this okay to change for all update/inserts on the config module, not knowing what other front-end values this might affect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked on demo and only saw 3 textarea config settings:

  1. The studyDescription used on the login page. This already uses DOMPurify to make sure the value is clean.
  2. The projectDescription used by the dashboard welcome widget. An admin would be able update the description to include unsafe HTML there, but this is addressed by PR [dashboard] Load project description from ajax and run through DOMPurify #8762.
  3. The citation_policy used by the acknowledgements module. This is used by the acknowledgements module inside of a React component, so it should be auto-escaped by React.

'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