Skip to content

C2: No authorization in the save handlers #10

Open

Description

@caseysoftware

Neither handler checks permissions beyond module access (which core now enforces for dosql):

  • do_holiday_aed.php with target=calendar changes the company holiday/working-day list.
  • do_holiday_aed.php with target=user and any user_id changes another user's vacations. The page only hides the user picker from non-admins.
  • do_holiday_settings_aed.php rewrites the system-wide cal_working_days, cal_day_start and cal_day_end, plus the holiday settings. The tab is hidden unless canEdit('system'), but the handler doesn't check.

Fix: require canEdit('system') for company and settings changes; for user vacations, allow only your own user_id unless the user can edit users/admin.

Files: do_holiday_aed.php, do_holiday_settings_aed.php

Evidence: found by reading the code against master; not reproduced on a running install.
Effort: S

Part of #1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecurityweb2project 5.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions