diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f65a265c..06c5870f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ For details about compatibility between different releases, see the **Commitment ### Fixed +- Potential leak of end devices of other (owned) applications in the top end devices panel in the application overview of the Console. + ### Security ## [3.32.1] - unreleased diff --git a/pkg/webui/console/containers/top-entities-dashboard-panel/top-devices/index.js b/pkg/webui/console/containers/top-entities-dashboard-panel/top-devices/index.js index a20c62f226..e1a0553c54 100644 --- a/pkg/webui/console/containers/top-entities-dashboard-panel/top-devices/index.js +++ b/pkg/webui/console/containers/top-entities-dashboard-panel/top-devices/index.js @@ -31,7 +31,10 @@ import { selectEndDeviceTopEntities } from '@console/store/selectors/top-entitie import EntitiesList from '../list' const TopDevicesList = ({ appId }) => { - const topEntityFilter = useMemo(() => (appId ? e => e.id.startsWith(appId) : undefined), [appId]) + const topEntityFilter = useMemo( + () => (appId ? e => e.id.split('/')[0] === appId : undefined), + [appId], + ) const items = useSelector(state => selectEndDeviceTopEntities(state, topEntityFilter)) const headers = [