28 Commits
Author SHA1 Message Date
F4ilji 65f4220932 fix(vikon): store version in file instead of cache to prevent revert after TTL expiry 2026-07-06 13:28:22 +05:00
F4ilji 720aa4d0ae feat(logging): migrate VikonIntegration to vikon channel 2026-07-05 23:13:51 +05:00
F4ilji eb142b2513 refactor(vikon): use Redis cache for version instead of file 2026-07-05 15:11:17 +05:00
F4ilji ad8a4d861b fix(vikon): read version from file and update after core update 2026-07-05 15:06:14 +05:00
F4ilji b0ff3bf397 feat(vikon): cleanup _old/_new artifacts after successful sync 2026-07-05 13:58:00 +05:00
F4ilji 416403b6ce debug(vikon): add detailed logging for ZIP size and FM sync stats 2026-07-05 13:33:13 +05:00
F4ilji b9ff255878 fix(vikon): use cURL streaming for ZIP downloads to avoid memory/timeout issues 2026-07-05 13:26:10 +05:00
F4ilji 0a5f99e6ae refactor(vikon): remove hardcoded module IDs and use config everywhere 2026-07-05 11:40:02 +05:00
F4ilji e3511462f7 fix(vikon): skip existing files during FM sync, match original PHP diff behavior
Original vikon_core sync_root_dir.php only downloads files that are
missing locally or have size 0. Added local file size check before
downloading to avoid re-fetching 14GB+ of existing files.
2026-07-04 23:25:59 +05:00
F4ilji b538b4119f fix(vikon): all FM files go to files/ dir, matching original PHP getFsPathByModule
Original vikon_core Path::getFsPathByModule() returns moduleRoot/files/,
not moduleRoot. Root FM files, 3-letter subdirs, and new files all go
under files/ directory. index.html etc come from core ZIP, not FM sync.
2026-07-04 23:02:43 +05:00
F4ilji cccdbbbbd8 fix(vikon): keep ZIP and extracted files in temp after update 2026-07-04 22:41:39 +05:00
F4ilji a33d93e163 fix(vikon): root files to module root, 3-letter dirs to files/{code}/
- UpdateCoreAction: split syncDirFiles into syncRootDir (→module root)
  and syncSubDir (→files/{dirId})
- SyncFilesAction: same split, matching original PHP vikon_core behavior
- index.html, file_stubs/ etc go to module root
- 3-letter FM codes (eib, eid, rir) go inside files/
2026-07-04 22:40:30 +05:00
F4ilji a7d0628a13 fix(vikon): use module root as FM sync base path instead of files/ subdir
Root files (index.html, file_stubs/) and non-3-letter directories now go
to module root where VIKON expects them, not into files/ subdirectory.
dir_name from FM API is relative to module root.
2026-07-04 22:31:10 +05:00
F4ilji bf3bcc4eca fix(vikon): revert syncDirFiles - keep 3-letter dirIds as subdirectories 2026-07-04 22:18:20 +05:00
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 87732720ef feat(vikon): merge core update + FM sync into single Update button 2026-07-04 21:25:29 +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 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 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 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