Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Validate width values to avoid unlikely security vulnerabilities.
If the database were compromised, a value like `500" onclick="alert(1)" foo="` could be inserted into the `custom_content_width` option, resulting in XSS. If the attacker had full access to the database, then they could obviously do much more damage, regardless of whether the widths are validated or not, but there are other scenarios where validating the widths could mitigate an attack, like if a vulnerability elsewhere allowed an attacker to insert an arbitrary value into an arbitrary option record, but they needed to find one that wasn't being escaped. That's not very likely, but it's better to be safe than sorry.
- Loading branch information
Showing
2 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters