github error311/FileRise v1.0.8

latest releases: v1.2.8, v1.2.7, v1.2.6...
24 days ago

Full Changelog: v1.0.7...v1.0.8

Changes 4/6/2025

Changelog: Modularize fileManager.js

  1. fileListView.js
     • Extracted all table/gallery rendering logic (loadFileList, renderFileTable, renderGalleryView, sortFiles, date parsing, pagination).
     • Kept global helpers on window (changePage, changeItemsPerPage).
     • Added explicit re‑binding of context‑menu and drag‑drop handlers after each render.
  2. filePreview.js
     • Moved “Preview” and “Share” modal code here (previewFile, openShareModal, plus displayFilePreview helper).
     • Exposed window.previewFile for inline onclick compatibility.
  3. fileEditor.js
     • Isolated CodeMirror editor logic (editFile, saveFile, sizing, theme toggles).
     • Exported utility functions (getModeForFile, adjustEditorSize, observeModalResize).
  4. fileDragDrop.js
     • Encapsulated all drag‑start and folder drag/drop handlers (fileDragStartHandler, folderDragOverHandler, etc.).
  5. fileMenu.js (formerly contextMenu.js)
     • Centralized right‑click context menu construction and binding (showFileContextMenu, fileListContextMenuHandler, bindFileListContextMenu).
     • Now calls the correct single vs. multi‑tag modals.
  6. fileActions.js
     • Consolidated all “Delete”, “Copy”, “Move”, “Download Zip”, “Extract Zip”, “Rename” workflows and their modals.
     • Exposed initFileActions() to wire up toolbar buttons on page load.
  7. fileManager.js (entry point)
     • Imports all the above modules.
     • On DOM ready: calls initFileActions(), attaches folder tree drag/drop, and global key handlers.

Changelog: OIDC, Basic Auth & TOTP Integration

  1. auth.php (OIDC)
     • Detects callback via ?code or ?oidc=callback.
     • Checks for a TOTP secret after OIDC auth, stores pending login in session, redirects with ?totp_required=1.
     • Finalizes session only after successful TOTP verification.

  2. login_basic.php (Basic Auth)
     • After password verification, checks for TOTP secret.
     • Stores pending login & secret in session, redirects to TOTP modal.
     • Completes session setup only after TOTP verification.

  3. authModals.js & auth.js
     • Detect ?totp_required=1 and open the TOTP modal.
     • Override showToast to suppress “Please log in…” during TOTP.
     • Wrap openTOTPLoginModal to disable Basic/OIDC buttons (but keep form-login visible).
     • On invalid TOTP code, keep modal open, clear input, and refocus for retry.

  4. totp_verify.php
     • Consolidates login and setup TOTP flows in one endpoint.
     • Enforces CSRF token and authentication guard.
     • Verifies TOTP, regenerates session on success, and clears pending state.
     • Production‑hardened: secure cookies, CSP header, rate‑limiting (5 attempts), standardized JSON responses, and robust error handling.

Don't miss a new FileRise release

NewReleases is sending notifications on new releases.