Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize field names and values when printing #7

Merged
merged 1 commit into from
May 6, 2022
Merged

Sanitize field names and values when printing #7

merged 1 commit into from
May 6, 2022

Conversation

unboundeduniverse
Copy link
Contributor

Type html code into custom field names and values. The html is rendered.
This is seen in various places on the configure and edit pages.

@@ -74,11 +74,11 @@
if ( $t_custom_field_def['type'] == CUSTOM_FIELD_TYPE_ENUM ||
$t_custom_field_def['type'] == CUSTOM_FIELD_TYPE_MULTILIST)
{
echo '<td>'. string_display_line( $t_custom_field_def['name'] ).'</td>';
echo '<td>'. string_attribute( $t_custom_field_def['name'] ).'</td>';
Copy link
Member

Choose a reason for hiding this comment

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

Technically this change is not necessary, string_display_line() will prevent XSS as well.

@dregad
Copy link
Member

dregad commented May 6, 2022

Thanks for your contribution !

@dregad dregad merged commit ea11790 into mantisbt-plugins:master May 6, 2022
@unboundeduniverse unboundeduniverse deleted the my-patch-2 branch May 9, 2022 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants