UI - Redirect on invalid URL parameter to /software/add/fleet-maintained/:id (#24637)
## #24636 Redirect when NaN "foobar" provided as software id in url: https://github.com/user-attachments/assets/e1b0ce3d-f494-447c-a452-285f0e6758af - [x] Changes file added for user-visible changes in `changes/`, - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
This commit is contained in:
co-authored by
Jacob Shandling
parent
fb118b6f35
commit
7e5000cf52
@@ -0,0 +1 @@
|
||||
* Redirect when user provides an invalid URL param for fleet-maintained software id
|
||||
+3
@@ -98,6 +98,9 @@ const FleetMaintainedAppDetailsPage = ({
|
||||
}: IFleetMaintainedAppDetailsPageProps) => {
|
||||
const teamId = location.query.team_id;
|
||||
const appId = parseInt(routeParams.id, 10);
|
||||
if (isNaN(appId)) {
|
||||
router.push(PATHS.SOFTWARE_ADD_FLEET_MAINTAINED);
|
||||
}
|
||||
|
||||
const { renderFlash } = useContext(NotificationContext);
|
||||
const { isPremiumTier } = useContext(AppContext);
|
||||
|
||||
Reference in New Issue
Block a user