Some improvements - #213
Merged
Merged
Conversation
cryol
approved these changes
May 4, 2026
Owner
|
Hi, |
Owner
|
Hi, I reviewed the changes, looks good to me. Two things before I merge:
Thanks! |
…Makefile, CI, README
…n download optimization
This was referenced Jun 9, 2026
Open
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.
Bug fixes
Fix premature
$zipunset in remote upload (src/main.php): removed an erroneousunset($zip)call before the variable was used in the temporary file path logic, which could cause a PHP notice or unexpected behavior.Remove dup: the code block @src/ifm.js:322-354 that was accidentally duplicated during the commit 3325648 has been removed.
tar overwite: when creating an archive named
<archivename>.tar.<gz/bz2>, if a file named<archivename>.taralready exists in the same folder, it will be overwritten with temporary data for the new archive.Fix copy files: when copying files via the menu, files with a dot at the beginning of their names (hidden files) were ignored.
Security
Timing attack: if user not exist. An attacker could determine valid logins based on response times. Add dummy hash verification.
BCrypt: support for all hashes, not just
$2y$.htpasswd: proper separation of username and password.
Performance improvements
Icons: make possible to use load it from CDN.
Minification: add
.cssand.jsembeded files minification.JSON minification: add i18n language files minification.
Skip recompression for already-compressed formats:
createZipnow accepts a$noCompressExtensionslist (defaulting to video, audio, image, archive, and Office formats) and appliesZipArchive::CM_STOREfor those file types instead ofCM_DEFLATE. Avoids wasting CPU time and potentially inflating archive size when adding files that are already compressed.Use system
zipbinary when available: for single-source archives,createZipnow attempts to call the systemzipcommand first viacreateZipSystem(). This avoids loading the entire file tree into PHP memory, which matters for large directories. Falls back toZipArchiveif the binary is not available.Download files: reading the file via a buffer (which, for some reason, is as large as 64 MB) has been replaced with the built-in
readfilefunction, which reads the file in 8-KB chunks and does not result in increased memory usage regardless of the file size.Search: the complexity of the search loop has been reduced from O(n²).
Cache: language, current rootdir, uid, gid...
Function calls: have been moved from inside the loop to variables before the loop.
Dirs & files sort: use
usortwith direct comparison instead of sorting a temporary array. Reduced memory usage for directories containing a large number of files and subdirectories.Mime type detection: detect the MIME type only once for each file extension and cache it.
Icons
Migrate all icons to original Font Awesome to be possible to use icons from CDN (
src/main.php,src/templates/app.html,src/ifm.js): replaced the customicon-*font classes throughout the codebase — navbar actions, file type icons, context menu entries, and the footer GitHub link — with equivalent Font Awesome classes (fa-folder-o,fa-file-audio-o,fa-file-pdf-o, etc.). Eliminates the dependency on the bundled custom icon font.Bundle Font Awesome (
src/includes/font-awesome.min.css): added Font Awesome as a local include so the icon set works offline and without a CDN dependency.Change copy action icon (
src/ifm.js): replacedicon-folder-emptywithicon-docsfor the copy context menu entry to better reflect the action semantics.Icon width: fixed icon width in
filetableandbootstrapMenu.UX improvements
Remove secondary dropdown from navbar (
src/templates/app.html): Remote Upload, AJAX Request, and Logout were previously collapsed into a single overflow dropdown. They are now individual nav items, consistent with the rest of the toolbar. This improves discoverability and touch target size on mobile.Autofocus on first text input in all modals:
showModalnow respects theautofocusattribute — focuses the marked element if present, otherwise falls back to the first non-radio/checkbox input. Addedautofocusto all relevant modal inputs (create dir, rename, create archive, remote upload, AJAX request, search).autocomplete="off"on URL inputs: prevents browsers from polluting URL fields with browsing history.AJAX Request modal (
modal.ajaxrequest.html,src/ifm.js): restructured layout — method selector moved under the URL field; the Data textarea is now hidden when GET is selected and shown only for POST; HTTP status code is displayed as a colour-coded badge next to the Response label (green for 2xx, red for errors); error responses are shown in the response textarea instead of a generic toast; Cancel button moved tomodal-footerfor consistency with all other modals.Remote Upload modal (
modal.remoteupload.html,src/ifm.js): filename field is now auto-populated from the URL (query string and fragment stripped); if the extracted name already exists in the current directory it is suffixed with(1),(2), etc. Added URL placeholder.Extract File modal (
modal.extractfile.html,src/style.css): clicking a readonly path option now selects its radio button; the currently selected option is highlighted with a blue outline using CSS:has(input[type="radio"]:checked).Search modal (
modal.search.html,src/ifm.js): added a search button inside the input group so the search can be triggered without a keyboard (useful on mobile); search results container gainsmax-height: 60vhwith scroll to prevent the modal from overflowing the viewport.Duplicate name validation (
modal.createdir.html,modal.file.html,src/ifm.js): clicking Create/Save now checks the name against the current file list and shows an inlineinvalid-feedbackerror if the name is taken. For the file editor, the check is skipped when saving under the original filename (i.e. overwriting the file being edited is allowed). New i18n keyname_already_existsadded to all 10 language files.Lang param: add
langto<html>. This improves accessibility and aligns with best practices.Permissions: removed empty space right of the
Permissions.Developer tooling
Add
Makefile: targets —make lint(PHPMD),make syntax-check(PHP-lon all tracked files),make build/build-cdn/build-all,make clean.Add
composer.jsonwith PHPMD: dev dependency somake lintworks aftercomposer installwithout a globally installed tool.Update
.gitignore: excludescomposer.lock.Add
docker-compose.yml: to simplify the build and testing process. To build CDN version setCDN=trueenv.Update ACE editor to latest version.
Version link: The version link in the footer now leads to the corresponding release instead of the branch.
Project page: Now github icon with title.
Dockerfile: Multistage build.
Github Actions: Remove IFM build from PHPMD pipeline. Update dependencies.