In shortcut_per_role_admin_form() there is this code:
t('Assign Shortcuts for ' . $role . ' Role')
This means that the $role variable (which is user input) is being printed to the screen without proper escaping. This would generally be considered a security issue. (In the specific case of role names it isn't quite a security issue since Drupal assumes that if you have permission to change role names you're already a high-level site administrator, but it's still a good idea to sanitize them before display anyway, and that's what's done elsewhere in the codebase.)
This should be changed to something like the following:
t('Assign shortcuts for @role role', array('@role' => $role))
The @-style placeholder causes the code in t() to pass the data through check_plain() before outputting it.
In addition to the security issue, this also makes the string properly translatable (without that, there is no way for translators to get a single, constant string from this line of code that they can translate).
Comments
Comment #1
webankit commented