Skip to content

Fix: add missing right checks on Jamf ajax endpoints - #34

Open
Rom1-B wants to merge 1 commit into
mainfrom
fix_check
Open

Fix: add missing right checks on Jamf ajax endpoints#34
Rom1-B wants to merge 1 commit into
mainfrom
fix_check

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Jul 29, 2026

Copy link
Copy Markdown

Checklist before requesting a review

Please delete options that are not relevant.

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes #N/A
  • Several ajax actions (device import, device merge, forced resync, manual cron launch, MDM command form) only checked that the user was logged in, without checking that the user actually had the right to perform the action.
    A user without the relevant right, or acting on an item outside their entity, could trigger these actions anyway.
    The endpoints now check the expected right, and for import/merge/sync/MDM form, also verify the targeted item belongs to an entity the user has access to before acting on it.
    A redundant manual escaping of values before an ORM update call was also removed from the computer and mobile device sync classes.

Screenshots (if appropriate):

@Rom1-B
Rom1-B requested a review from cconard96 July 29, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants