mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
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:
parent
fb118b6f35
commit
7e5000cf52
2 changed files with 4 additions and 0 deletions
1
changes/24636-UI-redirect-for-invalid-url-param
Normal file
1
changes/24636-UI-redirect-for-invalid-url-param
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Redirect when user provides an invalid URL param for fleet-maintained software id
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue