This is an automated email from the ASF dual-hosted git repository.
rfellows pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new b2ac03d68f NIFI-14880: Setting noreferrer when invoking window.open().
(#10220)
b2ac03d68f is described below
commit b2ac03d68f79fd356212f50e10b96a947272fbd0
Author: Matt Gilman <[email protected]>
AuthorDate: Wed Aug 20 13:25:36 2025 -0400
NIFI-14880: Setting noreferrer when invoking window.open(). (#10220)
This closes #10220
---
.../add-tenant-to-policy-dialog.component.ts | 24 +++++++++++++---------
.../pages/flow-designer/service/flow.service.ts | 6 ++++--
.../pages/provenance/service/provenance.service.ts | 4 ++--
.../src/app/pages/queue/service/queue.service.ts | 4 ++--
.../connection-status-table.component.html | 4 +++-
.../connection-status-table.component.ts | 13 +++++++++---
6 files changed, 35 insertions(+), 20 deletions(-)
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/access-policies/ui/common/add-tenant-to-policy-dialog/add-tenant-to-policy-dialog.component.ts
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/access-policies/ui/common/add-tenant-to-policy-dialog/add-tenant-to-policy-dialog.component.ts
index 2bb71c1be8..5b93106127 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/access-policies/ui/common/add-tenant-to-policy-dialog/add-tenant-to-policy-dialog.component.ts
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/access-policies/ui/common/add-tenant-to-policy-dialog/add-tenant-to-policy-dialog.component.ts
@@ -56,11 +56,13 @@ export class AddTenantToPolicyDialog extends
CloseOnEscapeDialog {
users$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((users:
UserEntity[]) => {
const policy: AccessPolicy = this.request.accessPolicy.component;
- this.filteredUsers = users.filter((user: UserEntity) => {
- return !policy.users.some((tenant: TenantEntity) => tenant.id
=== user.id);
- }).sort((a,b) => {
- return
a.component.identity.localeCompare(b.component.identity);
- });
+ this.filteredUsers = users
+ .filter((user: UserEntity) => {
+ return !policy.users.some((tenant: TenantEntity) =>
tenant.id === user.id);
+ })
+ .sort((a, b) => {
+ return
a.component.identity.localeCompare(b.component.identity);
+ });
this.userLookup.clear();
this.filteredUsers.forEach((user: UserEntity) => {
@@ -73,11 +75,13 @@ export class AddTenantToPolicyDialog extends
CloseOnEscapeDialog {
userGroups$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((userGroups:
UserGroupEntity[]) => {
const policy: AccessPolicy = this.request.accessPolicy.component;
- this.filteredUserGroups = userGroups.filter((userGroup:
UserGroupEntity) => {
- return !policy.userGroups.some((tenant: TenantEntity) =>
tenant.id === userGroup.id);
- }).sort((a,b) => {
- return
a.component.identity.localeCompare(b.component.identity);
- });
+ this.filteredUserGroups = userGroups
+ .filter((userGroup: UserGroupEntity) => {
+ return !policy.userGroups.some((tenant: TenantEntity) =>
tenant.id === userGroup.id);
+ })
+ .sort((a, b) => {
+ return
a.component.identity.localeCompare(b.component.identity);
+ });
this.userGroupLookup.clear();
this.filteredUserGroups.forEach((user: UserGroupEntity) => {
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/flow.service.ts
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/flow.service.ts
index ef8af0d6dd..05e94729f7 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/flow.service.ts
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/service/flow.service.ts
@@ -134,7 +134,7 @@ export class FlowService implements
PropertyDescriptorRetriever {
}
goToRemoteProcessGroup(goToRemoteProcessGroupRequest:
GoToRemoteProcessGroupRequest) {
- window.open(encodeURI(goToRemoteProcessGroupRequest.uri));
+ window.open(encodeURI(goToRemoteProcessGroupRequest.uri), '_blank',
'noreferrer');
}
createProcessor(processGroupId = 'root', createProcessor:
CreateProcessorRequest): Observable<any> {
@@ -472,7 +472,9 @@ export class FlowService implements
PropertyDescriptorRetriever {
downloadFlow(downloadFlowRequest: DownloadFlowRequest): void {
window.open(
-
`${FlowService.API}/process-groups/${downloadFlowRequest.processGroupId}/download?includeReferencedServices=${downloadFlowRequest.includeReferencedServices}`
+
`${FlowService.API}/process-groups/${downloadFlowRequest.processGroupId}/download?includeReferencedServices=${downloadFlowRequest.includeReferencedServices}`,
+ '_blank',
+ 'noreferrer'
);
}
}
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/provenance/service/provenance.service.ts
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/provenance/service/provenance.service.ts
index f9a97405ea..2dfe322b7f 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/provenance/service/provenance.service.ts
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/provenance/service/provenance.service.ts
@@ -84,7 +84,7 @@ export class ProvenanceService {
dataUri = `${dataUri}?${query}`;
}
- window.open(dataUri);
+ window.open(dataUri, '_blank', 'noreferrer');
}
viewContent(
@@ -133,7 +133,7 @@ export class ProvenanceService {
// open the content viewer
const contentViewerQuery: string = new
URLSearchParams(contentViewerParameters).toString();
- window.open(`${contentViewer}${contentViewerQuery}`);
+ window.open(`${contentViewer}${contentViewerQuery}`, '_blank',
'noreferrer');
}
replay(eventId: number, clusterNodeId?: string): Observable<any> {
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/queue/service/queue.service.ts
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/queue/service/queue.service.ts
index 5099549727..d34977c49b 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/queue/service/queue.service.ts
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/queue/service/queue.service.ts
@@ -80,7 +80,7 @@ export class QueueService {
dataUri = `${dataUri}?${query}`;
}
- window.open(dataUri);
+ window.open(dataUri, '_blank', 'noreferrer');
}
viewContent(request: ViewFlowFileContentRequest, contentViewerUrl:
string): void {
@@ -120,6 +120,6 @@ export class QueueService {
// open the content viewer
const contentViewerQuery: string = new
URLSearchParams(contentViewerParameters).toString();
- window.open(`${contentViewer}${contentViewerQuery}`);
+ window.open(`${contentViewer}${contentViewerQuery}`, '_blank',
'noreferrer');
}
}
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html
index b9c2e202d3..7d04656255 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html
@@ -196,7 +196,9 @@
<!-- Load Balance Status Column -->
<ng-container matColumnDef="loadBalanceStatus">
<th mat-header-cell *matHeaderCellDef
mat-sort-header>
- <div class="overflow-ellipsis
overflow-hidden whitespace-nowrap">Load Balancing</div>
+ <div class="overflow-ellipsis
overflow-hidden whitespace-nowrap">
+ Load Balancing
+ </div>
</th>
<td mat-cell *matCellDef="let item"
[title]="formatLoadBalanceStatus(item)">
{{ formatLoadBalanceStatus(item) }}
diff --git
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts
index 30e099ea08..12372947f7 100644
---
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts
+++
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts
@@ -31,7 +31,15 @@ import { ComponentStatusTable } from
'../../common/component-status-table/compon
import { MatButtonModule } from '@angular/material/button';
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
-export type SupportedColumns = 'name' | 'queue' | 'in' | 'out' | 'threshold' |
'sourceName' | 'destinationName' | 'loadBalanceStatus';
+export type SupportedColumns =
+ | 'name'
+ | 'queue'
+ | 'in'
+ | 'out'
+ | 'threshold'
+ | 'sourceName'
+ | 'destinationName'
+ | 'loadBalanceStatus';
@Component({
selector: 'connection-status-table',
@@ -141,8 +149,7 @@ export class ConnectionStatusTable extends
ComponentStatusTable<ConnectionStatus
return 'Inactive';
default:
return connection.connectionStatusSnapshot.loadBalanceStatus;
-
- }
+ }
}
override supportsMultiValuedSort(sort: Sort): boolean {