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

Fixes: JENKINS-71794 Redesign build queue | UX #339

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,13 @@
<j:choose>
<j:when test="${rAuth != null}">
<a href="${rootURL}/${r.parent.url}"><l:breakable value="${r.parent.fullDisplayName}"/></a>
<t:buildProgressBar build="${it}" executor="${executor}"/>
</j:when>
<j:otherwise>
<span>${%Unknown Pipeline node step}</span>
</j:otherwise>
</j:choose>
</div>
</td>
<td class="pane">
<j:if test="${rAuth != null}">
<a href="${rootURL}/${r.url}" class="model-link inside"><l:breakable value="${r.displayName}"/></a>
<st:nbsp/>
<div>
<j:set var="label" value="${it.parent.enclosingLabel}"/>
Copy link
Member

Choose a reason for hiding this comment

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

You are changing the logic for when this part is visible (depending on rAuth), which may introduce a security regression (displaying possibly sensitive information to unauthorized or anonymous users).

Copy link
Author

Choose a reason for hiding this comment

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

@jglick I see, it does make sense to add a check for rAuth. Currently I have added a conditional statement for label so I'll also have to add an conditional statement if rAuth != null as well. That way user will only be able to see label if user is authorized and label is not equal to null. Am I correct?

Copy link
Member

Choose a reason for hiding this comment

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

Something like that. Just ensure that the authorization logic is identical to the previous state.

<j:choose>
<j:when test="${label != null}">
Expand All @@ -53,6 +48,12 @@
${%part}
</j:otherwise>
</j:choose>
</div>
</td>
<td class="pane">
<j:if test="${rAuth != null}">
<a href="${rootURL}/${r.url}" class="model-link inside"><l:breakable value="${r.displayName}"/></a>
<t:buildProgressBar build="${it}" executor="${executor}"/>
</j:if>
</td>
</j:jelly>