Improvements:
Access to employee requests and applications now considers the department head defined by position in the company structure: previously, when determining the head, only the 'Head' and 'HR' fields of the department were considered, and such a head could not see requests and applications of their employees.
Rights to modify, delete, and work with request attachments have been aligned with the general rule for request visibility: a process participant (author, current executor, approver) can modify the request available to them; a head of departments defined by position has the right to edit requests of their employees, and a module administrator has the right to all requests. Upon refusal, a correct 'Access denied' error is returned instead of an internal server error.
Security:
A bypass of visibility restrictions in absence lists, applications, and requests has been fixed: tampered filters by department, search, author, approver, and current executor no longer expand the selection. Absences are visible within their own departments and departments where the user is a head or HR; applications and requests are visible only for the user themselves, with the user's participation in the approval process, or for employees of their departments as a head/HR.
Application and request cards check the same rights as lists; the T7 print form requires rights to the module.
A bypass of visibility restrictions in REST methods for absence schedules has been fixed: schedule methods no longer return data on vacation balances, absences, and department composition by employee identifier outside the set accessible to the user. Only 'me + colleagues from my departments + employees of departments where the user is a head or HR' is available.
The ability to change arbitrary user custom fields via the REST method webslon.absence.schedule.setUserField has been removed: the method accepts only the flag 'Allow expanding employees from multiple departments simultaneously'; for any other field, access is denied.
The possibility of reassigning another user's request to oneself via the REST method webslon.absence.hlblock.application.update has been eliminated: permissions are checked against the current request owner; service fields (owner, author, approver, current executor) cannot be changed through updates; editing is allowed only if the user has the edit action for the current request status in the process settings.
The bypass of visibility restrictions in REST methods for reading vacation data has been fixed: the request card (webslon.absence.vacation.init) is returned only to process participants, the employee themselves, their department manager, HR of their department, and the module administrator; period checks, employee notifications, and request warnings (webslon.absence.validation.checkPeriod, getNotifications, checkUsersNotifications) operate only within the employees and requests accessible to the user.
Exporting absences by employee login (webslon.absence.absence.list) for exchange with 1C now requires not only the exchange permission but also access to the vacation module.
When creating a request via the REST method webslon.absence.hlblock.application.add, service fields sent by the client are ignored: the author, approver, current executor, and creation date are determined by the server. Previously, it was possible to specify an arbitrary approver and request creation time.
A data leak of another employee's information via the REST method webslon.absence.userData has been eliminated: departments and employee lists are returned only for the user themselves and employees of their departments and departments where they serve as manager or HR.
In the print forms for requests and applications, the organization name, manager's position and full name, employee's full name, department, and employee's position are escaped: markup from custom fields no longer appears in the form as-is.
When creating an application based on a request (parameter sourceAppId), the user's access to the source request is verified: if rights are missing, the form is not displayed, and the employee and source request data are not populated.
When opening the application edit form, it is verified that the application is accessible to the user; otherwise, the form is not displayed and the application data is not read.
When creating an application based on another application (parameter sourceAppId), access is verified against the application itself, not the request with the same identifier: data from an inaccessible application is no longer populated into the form.
When creating and updating an application via the webslon.absence.hlblock.application.add and update REST methods, attachment fields sent by the client are ignored: files are attached and deleted only via the separate addFile and removeFile methods, with user file permission checks.
Creating an application on behalf of an employee is verified using the same visibility scope as viewing applications, ensuring creation and viewing rules no longer diverge.
Injection of a script into the application edit form via a spoofed application identifier in the page address has been prevented: values passed to the form scripts are converted to integer type or escaped, and the application identifier in the address is accepted only as a number.
Bug fixes:
The check for leave duration of 14 days or more has been corrected: when saving an application, absences without an application (e.g., actual leave, including that loaded via integration) were not taken into account, which could result in the error "One of the leave periods in the year must consist of 14 or more days".
The check for overlapping leave periods has been corrected: overlaps with absences without an application were not detected.
The display of the application change history has been corrected: field values were displayed with HTML entities (e.g., """ instead of quotation marks), and history markup could be escaped and shown as tags.
The history of the application is cleared when output by the Bitrix24 standard sanitizer: only formatting tags are allowed; all other text is escaped. Previously, markup from history field values could be rendered in the browser.
The possibility of injecting arbitrary parameters into the print form view page of the application has been eliminated: only the application identifier is passed to the page.
The debug mode of print form T7 (parameter debug=Y) is available only to the portal administrator. Customized templates from /local/webslon-absence/print/t7 are loaded only if standard files exist.
In the module settings, the back_url_settings value is cleared before output, and the redirect is performed only to local portal paths.
The obsolete file lib/intranet/1c_intranet.php no longer accepts login and password in GET parameters: authentication is performed only via POST request.
Print forms of the application check the same permissions as the application card: a process participant who can view the application can print it.
Organization details in print form T7 are escaped: special characters (&, quotes, angle brackets) in the organization name, positions, and full names are displayed correctly and do not distort the form.