fix: three core defects found in the pre-2026.3.40 audit - #1098
Merged
Conversation
…olumn OutWorkTimes has no `name` column — the `name` field in the API response is an alias for `description` (DataStructure::createForList). Passing it in searchableFields/allowedOrderFields made the ORM raise "Column 'name' doesn't belong to any of the selected models", so any search or ordering request on the time-conditions page failed instead of returning data. Verified on a live stand: GET /pbxcore/api/v3/off-work-times?search=x went from an ORM error payload to 200, and order_by=description now sorts. Sentry: MIKOPBX-MBB
…tails.data
InstallPipeline pushes stage events that carry only `result`/`messages` (e.g. a
failure raised before the download starts), so the download/upload/installation
callbacks crashed with "Cannot read properties of undefined" while reading
stageDetails.data.*. The progress bar froze even though the installation itself
kept running.
Uses the `|| {}` idiom already present in this file rather than optional
chaining, to stay within the airbnb babel preset. Transpiled artifact rebuilt.
Sentry: MIKOPBX-PCV, MIKOPBX-KX3
…reaming Legacy modules return the 2017 layout where `fpassthru` is the boolean flag and filename/content_type/need_delete sit on `data` itself, so handleSpecialResponse() passed `true` into handleFileStreaming(array $fileData) and raised a TypeError. The flat shape now falls through to the normal payload path, where ModulesControllerBase::handleFilePassThrough() picks it up as it has since 2017 — it owns the legacy headers (Content-Disposition with basename, text/plain fallback), which handleFileStreaming() does not reproduce. Core actions all use the nested array shape and are unaffected. Sentry: MIKOPBX-PEX
Collaborator
Author
|
Про тесты: отдельных юнит-тестов не добавлено.
Также: стенд 172.16.32.85 hot-patched версией |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Три независимых дефекта ядра, подтверждённых на боевом трафике и в Sentry при аудите перед релизом 2026.3.40. Каждый — отдельный коммит; при желании легко разнести по разным PR.
1.
OutWorkTimesGetList — поиск и сортировка ломались (MIKOPBX-MBB)У модели нет колонки
name; полеnameв ответе — алиасdescription. Убрано изsearchableFields/allowedOrderFields, поправлен apidoc.Проверено на живом стенде:
GET /pbxcore/api/v3/off-work-times?search=x— былоColumn 'name' doesn't belong to any of the selected models, стало200;order_by=descriptionсортирует.Замечание:
order_by=nameтеперь молча деградирует кpriority ASC(сортировка на этой странице в UI отключена, вызывающих в коде нет). Если нужно приниматьname, есть прецедент$fieldMapвLib/TimeSettings/DataStructure.php.2. JS-воркер статуса установки модулей (MIKOPBX-PCV, MIKOPBX-KX3)
InstallPipelineшлёт события безstageDetails.data— три колбэка падали сCannot read properties of undefined, прогресс-бар замирал. Добавлены|| {}в стиле файла (не optional chaining — из-за пресета airbnb). Транспилированный артефакт пересобран.3.
handleFileStreamingполучалtrue(MIKOPBX-PEX)Легаси-модули используют плоский формат 2017 года (
fpassthru => true, ключи наdata) → TypeError. Теперь плоский формат проходит дальше по обычному пути, где его забираетModulesControllerBase::handleFilePassThrough()— он владеет легаси-заголовками (Content-Dispositionс basename, fallbacktext/plain), которыхhandleFileStreaming()не воспроизводит. Все core-действия используют вложенный массив и не затронуты.Проверки
property.notFound), регрессии нет.GetList-действиям (других алиасов-фантомов нет) и по всем производителямfpassthru.