F4ilji
c4314e2f43
fix(vikon): use getFileByIdentityInfo dir_name for correct file paths
2026-07-04 22:15:59 +05:00
F4ilji
d7c9de2bd6
fix(vikon): restore syncDirFiles subdirs - files go to files/{dirId}/
2026-07-04 21:55:29 +05:00
F4ilji
241ac576fe
fix(vikon): revert syncDirFiles - save files directly in files/ without subdirs
2026-07-04 21:52:21 +05:00
F4ilji
997ef6d483
fix(vikon): syncDirFiles saves to correct subdirectory, increase timeouts to 600s
2026-07-04 21:49:17 +05:00
F4ilji
b115cb93fd
fix(vikon): increase nginx fastcgi_read_timeout to 600s, PHP set_time_limit 600
2026-07-04 21:40:51 +05:00
F4ilji
87732720ef
feat(vikon): merge core update + FM sync into single Update button
2026-07-04 21:25:29 +05:00
F4ilji
20382da0bc
fix(vikon): rewrite SyncFilesAction - always download, add logging
2026-07-04 21:11:00 +05:00
F4ilji
0811c4f1fc
fix(vikon): add parameter to SyncFilesAction singleton
2026-07-04 20:55:14 +05:00
F4ilji
8e5f26da8d
feat(vikon): add file sync from VIKON file manager (FM)
2026-07-04 20:41:49 +05:00
F4ilji
e64f9cca83
fix(vikon): save ABITUR API response in temp for reference
2026-07-04 20:26:25 +05:00
F4ilji
b4829492e5
fix(vikon): keep ZIP archive in temp after update
2026-07-04 20:17:33 +05:00
F4ilji
d358e6fdb0
fix(vikon): keep downloaded files in temp after update
2026-07-04 20:16:56 +05:00
F4ilji
e0cf362433
fix(vikon): create target directories before rename in syncFiles
2026-07-04 19:29:50 +05:00
F4ilji
0097a803b4
fix(vikon): sync from extracted subdirectory inside ZIP
2026-07-04 19:21:32 +05:00
F4ilji
7d6b1a2342
fix(vikon): return actual error message in updateModule response
2026-07-04 19:16:43 +05:00
F4ilji
13df1c3a64
fix(vikon): simplify syncFiles - just overwrite, no backups or deletes
2026-07-04 19:11:25 +05:00
F4ilji
93bd3963bf
fix(vikon): use rename() instead of copy() for syncFiles - atomic, no extra disk space
2026-07-04 19:09:13 +05:00
F4ilji
e502225e9c
fix(vikon): clean up corrupted CheckAccessAction file
2026-07-04 19:01:05 +05:00
F4ilji
44abdb471f
fix(vikon): check writability only for module dirs (sveden, abitur, vsoko)
2026-07-04 18:46:23 +05:00
F4ilji
cb9639f10f
fix(vikon): fix excluded dirs matching for public/build and public/vikon_core
2026-07-04 18:45:34 +05:00
F4ilji
4cc3505050
fix(vikon): exclude non-writable dirs from access check (vendor, build, vikon_core)
2026-07-04 18:34:19 +05:00
F4ilji
11b145861d
fix(vikon): use vikon_core redirect_uri in oauthCallback to match VIKON server registration
2026-07-04 18:28:34 +05:00
F4ilji
15dd66b636
fix(vikon): register vikon.refresh in correct HttpKernel (Ship)
2026-07-04 17:55:53 +05:00
F4ilji
5600f21937
fix(vikon): rename authorize() to getAuthUrl() to avoid parent conflict
2026-07-04 17:46:14 +05:00
F4ilji
3dc29d44d8
fix(vikon): DNS bypass, OAuth callback, ABITUR init, token cache, ZIP security
...
- Add CURLOPT_RESOLVE DNS bypass for db-nica.ru / file.db-nica.ru
- Add OAuth callback route with CSRF state validation
- Add /authorize endpoint to generate OAuth URL with state
- Add ABITUR special case: init empty module core without ZIP download
- Add token validation caching (150s) to reduce API calls
- Block PHP/PHTML/PHAR files inside ZIP before extraction
- Add VikonTokenRefresh middleware for auto token refresh
- Add vikon.refresh middleware alias to Kernel
2026-07-04 17:44:50 +05:00
F4ilji
93721fc5ae
fix(vikon): use correct VIKON API endpoints
...
- CheckAccessAction: pull_updates/assist/getModulesTreeAsync (not checkAccessJson)
- CheckVersionAction: pull_updates/assist/getUpdateVersionJson (not getLatestVersion)
These are the actual endpoints used by the original vikon_core update.js
2026-07-04 13:57:17 +05:00
F4ilji
967db81d3c
fix(vikon): use correct token introspect endpoint for update system
...
Original vikon_core security.php validates tokens via:
POST db-nica.ru/oauth2/resource/token/introspect
Body: client_id=542&access_token=XXX
Our code was incorrectly using:
GET auth.db-nica.ru/api/profile_applicant/check_access_token
Header: Authorization: Bearer XXX
This was the WRONG endpoint — the profile check is for abitur forms,
not for the update system.
2026-07-04 13:54:56 +05:00
F4ilji
a963647770
fix(vikon): use form-encoded POST + correct domain for OAuth token exchange
...
- HttpTask::post() now sends application/x-www-form-urlencoded (not JSON)
- AuthenticateAction sends to db-nica.ru (not auth.db-nica.ru) matching original vikon_core
- Original code: remoteRequest($apiDomen . 'oauth2/authorize/token', ...)
2026-07-04 13:46:49 +05:00
F4ilji
94e17dfbbc
fix(vikon): use api_domain for OAuth authorize URL (not auth_domain)
...
Original vikon_core used db-nica.ru for /oauth2/authorize, not auth.db-nica.ru.
This was causing 'Client authentication failed' error.
2026-07-04 13:33:39 +05:00
F4ilji
ba99b2a093
fix(vikon): switch validateFileTypes from blacklist to whitelist
...
Based on actual file analysis of sveden/abitur/vsoko modules:
- html, css, js, map (content + assets)
- png, jpg, gif, svg, ico, bmp (images)
- ttf, woff, woff2, eot (fonts)
- pdf, doc, docx (documents)
- vikon (module-specific)
No PHP/ASP/executables in allowed list — any non-whitelisted file is blocked.
2026-07-04 13:21:54 +05:00
F4ilji
f4f8bc8e77
feat(vikon): rewrite VikonIntegration from scratch — OAuth + core update
...
- HttpTask: Laravel Http facade with SSL enabled, retry, timeout
- ValidateTokenTask: token check via auth.db-nica.ru
- RefreshTokenTask: token refresh via db-nica.ru
- FilesystemTask: path traversal protection, blocked extensions (PHP/ASP/etc)
- AuthenticateAction: OAuth2 code→token exchange
- CheckAccessAction: token validation + filesystem writability check
- CheckVersionAction: version comparison against remote API
- UpdateCoreAction: ZIP download, Zip Slip protection, atomic sync with rollback
- VikonController: thin controller, 7 endpoints with Session-based token storage
- Routes: access-check, dashboard.auth, throttle:30,1 middleware
- Vue 3 Composition API frontend with progress bar
- Config: all secrets in .env via config/vikon.php
- vikon_core kept as fallback (not deleted)
2026-07-04 12:53:28 +05:00
F4ilji
47aac647ac
feat(vikon): remove broken VikonIntegration container - starting fresh
2026-07-04 12:40:41 +05:00
F4ilji
d87bc581d1
Fix: remove dead placeholder view path in AppServiceProvider
2026-07-02 20:56:37 +05:00
F4ilji
709c51ea49
remove: all deploy UI/backend code, keep _deploy folder only
...
- Delete DeployRunCommand, DeployController, deploy API routes
- Delete Dashboard/Deploy Vue pages and components
- Remove deploy route from web.php
- Remove deploy quick action from config
- Remove DeployRunCommand from ConsoleKernel
2026-07-02 17:36:42 +05:00
F4ilji
c8693b8f0e
fix: replace web middleware with minimal session+CSRF stack for deploy API
2026-07-02 17:34:27 +05:00
F4ilji
48ffd217b8
fix: secure deploy API, remove Docker-in-Docker, add DB backup
...
- Add web+superadmin middleware to /api/deploy routes
- Return JSON 403 in EnsureUserIsSuperadmin for API requests
- Remove Docker CLI and docker.sock from app container
- Replace docker compose restart with supervisorctl
- Add mysqldump backup step before migrations
2026-07-02 17:26:38 +05:00
F4ilji
fce1d3f454
fix: proper route structure - API in api.php, web in web.php
2026-07-02 17:10:44 +05:00
F4ilji
8b312e0ecd
fix: move deploy API routes to web group with session auth
2026-07-02 17:01:32 +05:00
F4ilji
c80baf4807
fix: return JSON 401 for unauthenticated API requests
2026-07-02 13:38:03 +05:00
F4ilji
c12ac98387
fix: register deploy:run command in ConsoleKernel
2026-07-02 12:57:14 +05:00
F4ilji
6fb0079e7c
feat: add deploy route and sidebar navigation
2026-07-02 12:50:09 +05:00
F4ilji
73d123a62d
feat: add deploy API endpoints
2026-07-02 12:48:09 +05:00
F4ilji
c216f929d4
feat: add deploy:run artisan command
2026-07-02 12:47:17 +05:00
F4ilji
8bc5c367d6
revert: remove deploy UI, controller, actions, tasks, and routes
...
- Remove Deploy/Index.vue, DeployController, DeploySiteAction, DeployTask
- Remove deploy routes from web.php
- Remove deploy menu item from menuConfig
- Remove deploy button and methods from Main.vue
- Remove deploy logging channel from logging.php
- Keep _deploy/ folder for future CI/CD setup
2026-07-02 12:00:48 +05:00
F4ilji
8364b220cc
feat: add Integration Credentials CRUD and Deploy UI
...
Integration Credentials:
- Add IntegrationCredential model with encrypted payload
- Add full CRUD: ManageIntegrationCredentialsAction, 4 Tasks, Controller, Requests
- Add migration for integration_credentials table
- Add Vue pages: Index, Create, Edit
- AI tasks now read API keys from DB instead of .env
- Add sidebar menu item
Deploy UI:
- Add DeployTask with full deploy lifecycle management
- Extend DeployController with index, log, history endpoints
- Add Deploy/Index.vue with live polling and deploy log viewer
- Add sidebar menu item and QuickAction for Sveden
UI:
- Add 'key' icon to SidebarNavItem
- Change deploy button color to amber in Main.vue
2026-07-02 01:03:13 +05:00
F4ilji
09bba25993
feat: add dedicated deploy logging to storage/logs/deploy.log
...
- Add 'deploy' channel in logging.php
- Instrument DeployTask with phpLog() for all state transitions
- Instrument DeploySiteAction with channel('deploy') for triggers, errors, clears
- Logs written to storage/logs/deploy.log (separate from laravel.log)
2026-07-02 00:57:57 +05:00
F4ilji
8bc42f3a9b
feat: add UUID, slug generation and defaults to educational program creation
...
- Auto-generate UUID and unique slug (with education level suffix)
- Set default values for inner_code, learning_forms, direction_study_id
- Slug avoids duplicates by appending numeric suffix
2026-07-02 00:29:38 +05:00
F4ilji
6750ca8f45
fix: add error flash message to Inertia shared props
...
Add error session key to flash messages so frontend can display
error notifications from session flash data.
2026-07-02 00:29:34 +05:00
F4ilji
2997558a50
refactor: move ByteConverter from Helpers to Services namespace
...
- Move ByteConverter class to App\Ship\Services
- Update all imports across Filament form blocks
- Update ByteConverterServiceProvider
- Add INTEGRATION_CREDENTIAL_PREFIX to CacheKeys enum
2026-07-02 00:29:29 +05:00
F4ilji
c9fca0bf29
feat: add Sveden update feature
...
- SvedenController: upload zip and extract to public/sveden
- UpdateSvedenAction: orchestrates temp file handling and extraction
- ExtractSvedenArchiveTask: validates and extracts sveden/abitur folders with security checks
- Sveden.vue: upload UI with progress indicator
- Added routes: GET/POST /dashboard/sveden
- Added quick action: Обновить Sveden
2026-06-30 16:12:16 +05:00