Skip to content

Commit

Permalink
#7378 Fix reflected XSS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Oct 13, 2021
1 parent 11bfc64 commit b6b32e7
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion templates/common/userDetails.tpl
Expand Up @@ -127,7 +127,7 @@
{else}
{assign var="checked" value=false}
{/if}
{fbvElement type="checkbox" name="userLocales[]" id="userLocales-$localeKey" value=$localeKey checked=$checked label=$localeName translate=false}
{fbvElement type="checkbox" name="userLocales[]" id="userLocales-$localeKey" value=$localeKey checked=$checked label=$localeName|escape translate=false}
{/foreach}
{/fbvFormSection}
{/if}
Expand Down
Expand Up @@ -22,7 +22,7 @@
{fbvFormArea id="availableLocalesFormArea" title="admin.languages.availableLocales"}
{fbvFormSection list="true" description="admin.languages.installNewLocalesInstructions"}
{foreach name=locales from=$notInstalledLocales item=locale}
{fbvElement type="checkbox" id="locale-$locale" name="localesToInstall[$locale]" value=$locale label=$allLocales.$locale translate=false}
{fbvElement type="checkbox" id="locale-$locale" name="localesToInstall[$locale]" value=$locale label=$allLocales.$locale|escape translate=false}
{foreachelse}
<p>{translate key="admin.languages.noLocalesAvailable"}</p>
{/foreach}
Expand Down
2 changes: 1 addition & 1 deletion templates/controllers/grid/queries/form/queryForm.tpl
Expand Up @@ -31,7 +31,7 @@

{fbvFormSection list=true title="editor.submission.stageParticipants"}
{foreach from=$allParticipants item="participant" key="id"}
{fbvElement type="checkbox" id="users[]" value=$id checked=in_array($id, $assignedParticipants) label=$participant translate=false}
{fbvElement type="checkbox" id="users[]" value=$id checked=in_array($id, $assignedParticipants) label=$participant|escape translate=false}
{/foreach}
{/fbvFormSection}

Expand Down
Expand Up @@ -77,7 +77,7 @@
{if count($availableSubeditors)}
{fbvFormSection list=true title="submissionGroup.assignedSubEditors"}
{foreach from=$availableSubeditors item="subEditor" key="id"}
{fbvElement type="checkbox" id="subEditors[]" value=$id checked=in_array($id, $assignedToCategory) label=$subEditor translate=false}
{fbvElement type="checkbox" id="subEditors[]" value=$id checked=in_array($id, $assignedToCategory) label=$subEditor|escape translate=false}
{/foreach}
{/fbvFormSection}
{/if}
Expand Down
Expand Up @@ -57,7 +57,7 @@
{fbvFormSection}
{fbvFormSection list=true title="grid.user.userRoles"}
{foreach from=$allUserGroups item="userGroup" key="id"}
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup translate=false}
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup|escape translate=false}
{/foreach}
{/fbvFormSection}
{/fbvFormSection}
Expand Down
Expand Up @@ -18,14 +18,14 @@

{include file="controllers/notification/inPlaceNotification.tpl" notificationId="userRoleFormNotification"}

<h3>{translate key="grid.user.step2" userFullName=$userFullName}</h3>
<h3>{translate key="grid.user.step2" userFullName=$userFullName|escape}</h3>

<input type="hidden" id="userId" name="userId" value="{$userId|escape}" />

{fbvFormSection}
{fbvFormSection list=true title="grid.user.userRoles"}
{foreach from=$allUserGroups item="userGroup" key="id"}
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup translate=false}
{fbvElement type="checkbox" id="userGroupIds[]" value=$id checked=in_array($id, $assignedUserGroups) label=$userGroup|escape translate=false}
{/foreach}
{/fbvFormSection}
{/fbvFormSection}
Expand Down
Expand Up @@ -26,7 +26,7 @@
<input type="hidden" name="userId" value="{$userId|escape}"/>

{fbvFormSection title="stageParticipants.notify.startDiscussion"}
<p>{translate key="stageParticipants.notify.startDiscussion.description" userFullName=$userFullName}</p>
<p>{translate key="stageParticipants.notify.startDiscussion.description" userFullName=$userFullName|escape}</p>
{/fbvFormSection}

{fbvFormSection title="stageParticipants.notify.chooseMessage" for="template" size=$fbvStyles.size.medium}
Expand Down
Expand Up @@ -14,7 +14,7 @@
<span class="description">{translate key="submission.comments.sendCopyToReviewers"}</span>
<ul class="checkbox_and_radiobutton">
{foreach from=$reviewers item="name" key="id"}
{fbvElement type="checkbox" id="bccReviewers[]" value=$id checked=in_array($id, $selected) label=$name translate=false}
{fbvElement type="checkbox" id="bccReviewers[]" value=$id checked=in_array($id, $selected) label=$name|escape translate=false}
{/foreach}
</ul>
{/fbvFormSection}
Expand Down
Expand Up @@ -32,7 +32,7 @@
<p>{translate key=$decisionData.help}</p>
{/if}

{capture assign="sendEmailLabel"}{translate key="editor.submissionReview.sendEmail" authorName=$authorName}{/capture}
{capture assign="sendEmailLabel"}{translate key="editor.submissionReview.sendEmail" authorName=$authorName|escape}{/capture}
{if $skipEmail}
{assign var="skipEmailSkip" value=true}
{else}
Expand Down
Expand Up @@ -52,7 +52,7 @@
{/fbvFormSection}
{/if}

{capture assign="sendEmailLabel"}{translate key="editor.submissionReview.sendEmail" authorName=$authorName}{/capture}
{capture assign="sendEmailLabel"}{translate key="editor.submissionReview.sendEmail" authorName=$authorName|escape}{/capture}
{if $skipEmail}
{assign var="skipEmailSkip" value=true}
{else}
Expand Down
2 changes: 1 addition & 1 deletion templates/submission/form/categories.tpl
Expand Up @@ -19,7 +19,7 @@
{else}
{fbvFormSection list=true title="grid.category.categories"}
{foreach from=$categories item="category" key="id"}
{fbvElement type="checkbox" id="categories[]" value=$id checked=in_array($id, $assignedCategories) label=$category translate=false}
{fbvElement type="checkbox" id="categories[]" value=$id checked=in_array($id, $assignedCategories) label=$category|escape translate=false}
{/foreach}
{/fbvFormSection}
{/if}
Expand Down
2 changes: 1 addition & 1 deletion templates/user/contactForm.tpl
Expand Up @@ -41,7 +41,7 @@
{else}
{assign var="checked" value=false}
{/if}
{fbvElement type="checkbox" name="userLocales[]" id="userLocales-$localeKey" value=$localeKey checked=$checked label=$localeName translate=false}
{fbvElement type="checkbox" name="userLocales[]" id="userLocales-$localeKey" value=$localeKey checked=$checked label=$localeName|escape translate=false}
{/foreach}
{/fbvFormSection}
{/if}
Expand Down
6 changes: 3 additions & 3 deletions templates/user/userGroupSelfRegistration.tpl
Expand Up @@ -18,7 +18,7 @@
{assign var="checked" value=false}
{/if}
{if $userGroup->getPermitSelfRegistration()}
{fbvElement type="checkbox" id="readerGroup-$userGroupId" name="readerGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName() translate=false}
{fbvElement type="checkbox" id="readerGroup-$userGroupId" name="readerGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName()|escape translate=false}
{/if}
{/foreach}
{foreach from=$authorUserGroups[$contextId] item=userGroup}
Expand All @@ -29,7 +29,7 @@
{assign var="checked" value=false}
{/if}
{if $userGroup->getPermitSelfRegistration()}
{fbvElement type="checkbox" id="authorGroup-$userGroupId" name="authorGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName() translate=false}
{fbvElement type="checkbox" id="authorGroup-$userGroupId" name="authorGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName()|escape translate=false}
{/if}
{/foreach}
{foreach from=$reviewerUserGroups[$contextId] item=userGroup}
Expand All @@ -40,6 +40,6 @@
{assign var="checked" value=false}
{/if}
{if $userGroup->getPermitSelfRegistration()}
{fbvElement type="checkbox" id="reviewerGroup-$userGroupId" name="reviewerGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName() translate=false}
{fbvElement type="checkbox" id="reviewerGroup-$userGroupId" name="reviewerGroup[$userGroupId]" checked=$checked label=$userGroup->getLocalizedName()|escape translate=false}
{/if}
{/foreach}

0 comments on commit b6b32e7

Please sign in to comment.