Commit graph

197 commits

Author SHA1 Message Date
schmigz 8158333d93
Update tinyfilemanager.php (#568)
fm_get_file_mimes() was causing errors for unknown extensions as it was causing an error as array element was not defined and return value was never checked.  According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types and several other resources,  application/octet-stream is the default value for all other cases. An unknown file type should use this type.   I put a check in there to use that by default so a valid value is always returned.

It might be useful to replace this function with the  built-in PHP function mime_content_type() but that adds some additional dependencies as it does not always work out of the box with PHP.
2021-06-05 11:57:53 +05:30
sbivol e843adcf0b
Fix function name and add extensions for icons (#567)
* Set icons for more file extensions

* Fix function name
2021-06-05 08:33:57 +05:30
safraja f182e378e3
PHP8 fix and few other changes (#562) 2021-06-01 10:11:15 +05:30
Prasath Mani 27d7126767
Typo error fix #548 2021-05-17 15:05:46 +05:30
Prasath Mani a62bb38773 PR update and sync 2021-05-17 12:22:16 +05:30
Adrien Bonnel 603f048722
Fix PHP 5.X (#494)
Arrays cannot be used in "define" functions with PHP versions lower than 7.X
Solution given via my professional account (ArlorNaturalScientific)
2021-05-17 11:59:34 +05:30
Roni 9b5d2718ab
New translations (#537)
New translations

Novas Traduções
2021-05-17 11:55:47 +05:30
Roni db3f4c01ea
Added in preferences light or dark theme (#539)
Added in the preferences option to change the light or dark theme,

Now to change the theme will be in the preferences / settings area, along with other settings, and may even have other themes in the future.
2021-05-17 09:24:45 +05:30
William Gilmour c5d481c5cc
Fixed Rename with folder quotes (#534)
Fixed the Rename functionality to work with folders that contain single quotes in them by calling `addslashes` on the path.
2021-04-30 05:57:10 +05:30
Prasath Mani a04567d3ba Fix security issues #525 and #526 2021-04-22 13:41:35 +05:30
huntr.dev | the place to protect open source 03c3f6d7f9
Fixed 3 sinks which caused XSS in filename (#511)
Co-authored-by: Vaibhav Shinde <vaibhavkshinde20@gmail.com>
2021-03-22 18:26:55 +05:30
Prasath Mani 95147f5828 remove decoded php codes and code cleanup 2021-02-24 13:33:57 +05:30
ccdd13 dd9d7c09a2
Feat/mixed changes (#502)
* remove trailing whitespace

Signed-off-by: ccdd13 <78702084+ccdd13@users.noreply.github.com>

* safe include config.php with __DIR__

* replace doc url for $datetime_format from function.date.php to datetime.format.php

Signed-off-by: ccdd13 <ccdd13@users.noreply.github.com>

* put $auth_users & $readonly_users together

Signed-off-by: ccdd13 <ccdd13@users.noreply.github.com>

* update $datetime_format

Signed-off-by: ccdd13 <ccdd13@users.noreply.github.com>

Co-authored-by: ammm ccdd12 <mamok43076@dashseat.com>
Co-authored-by: ccdd13 <ccdd13@users.noreply.github.com>
2021-02-24 12:37:38 +05:30
Prasath Mani a19ff20768 Update vendor CDN versions 2021-02-23 11:47:57 +05:30
Peter Frost ef09231454
Fix file size display in file viewer (#475) 2020-12-23 20:46:00 +05:30
Dvash 211568ff4c
fix(actions): creating a backup in FM_ROOT_PATH (#418) 2020-08-26 03:55:13 +05:30
DvashVistrame c8fff90634
fix: prevent double write to file (#409) 2020-08-04 14:00:05 +05:30
safraja a6a28a6356
Fix sorting by date and size (#387)
Based on suggestions in https://github.com/prasathmani/tinyfilemanager/issues/197
but uses data-sort attribute (from DataTable wiki https://datatables.net/examples/advanced_init/html5-data-attributes.html) instead of invisible characters and also distinguishes files and folders, so they stay grouped even after sort.
(I am sorry for my bad English.)
2020-07-20 05:39:47 +05:30
zachlankton 65f7dc448d
Fixes #183, Fixes #289 (#400)
Fixes setting drop down boxes to the current ace editor mode and theme on page load.
2020-07-20 05:37:41 +05:30
zachlankton fb31a14873
Added Error Message When File Fails to Write (#399)
Added error checking and message for when file fails to write on the server side.  Before this change if a write failed on the server side it would still present the user with a misleading "Saved Successfully" Message.
2020-07-20 05:36:47 +05:30
Michael Milette c741ae2212
Notice: A non well formed numeric value encountered (#386)
Eliminates the following PHP warnings when error reporting is turned on:

Notice: A non well formed numeric value encountered in tinyfilemanager.php on line 2443
Notice: A non well formed numeric value encountered in tinyfilemanager.php on line 2444

This happens because PHP floor and round are expecting a (float), not an (int).
2020-06-27 16:02:09 +05:30
Prasath Mani 0a92002919 if exist include config.php #366 2020-05-24 17:07:17 +05:30
Prasath Mani 1dbe7c5339 dark mode #352
Request: Dark mode option in the admin section. #260
2020-05-24 14:00:27 +05:30
Nicolas Peugnet 8fb1816877
Create a new session if permission denied on current one (#331)
In a multi-user configuration, the current session file can be unreadable
by the current user. This tries to create a new session in this case.
2020-05-24 08:51:44 +05:30
TheFax 5903849388
Added Optional configuration file (#338)
* Added optional configuration file loading

* First commit of optional configuration file

This file is OPTIONAL.
If this file is not present in your webserver, tinyfilemanager will works with its internal configuration.

* removed define

define is not a configuration
2020-05-24 08:50:49 +05:30
Nguyen The Anh 0826838917
Add support user customized config file (if exists) (#242)
* feat(/): add support user customized config file (if exists)

* Show current process ID in Status bar + Make fm_get_filesize function much more concise (#245)

* Update Simplified Chinese (#241)

* Feature Font Size Choose Options / Bug Fix Settings not visible in auth=false (#240)

* Bug fix and PR #245, #241, #240

Co-authored-by: 刘明野 <898310895@qq.com>
Co-authored-by: B Bharath Kumar Reddy <39063133+bbharathkumarreddy@users.noreply.github.com>
Co-authored-by: Prasath Mani <prasath.mani@publicissapient.com>
Co-authored-by: Prasath Mani <prasathmani@users.noreply.github.com>
2020-05-24 08:50:25 +05:30
Prasath Mani a0c595a8e1 Security fix #357
Download file causes timeout #353
Download Restart @ 88% #312
download large file issues #259
File upload issue #354
FIle Upload URL error #360
Bug in .tar archive extraction when destination(s) file(s) already exist (HTTP error 500) #332
Backup File return false #201
2020-05-18 13:37:02 +05:30
rinoshiyo 1482e41f74
fix settings are not saved. (#361) 2020-05-18 09:45:54 +05:30
Vincent Vandalon 1ca011ca67
Added duplicate functionality (#146)
* Added duplicate functionality

* Updated functionality to also duplicate folders

* Merged copy & duplicate buttons
2020-03-23 19:31:44 +05:30
Roni e259ffda4d
Update tinyfilemanager.php (#327) 2020-03-20 07:55:51 +05:30
Maxim Khokhryakov e8fc6d546a
fix "Archive not created" error (#317)
fix "Archive not created" error while trying to create Tar archive
2020-03-12 12:48:19 +05:30
Akira Ely 1501835f61
Update tinyfilemanager.php (#309)
Login box stays middle on small screens
2020-02-24 11:39:53 +05:30
Michele Locati c991555de5
Avoid accessing undefined $_POST['file'] index (#308)
I don't know when this occurs, but I have this entry in my web server log:
 PHP Notice:  Undefined index: file in tinyfilemanager.php on line 1165
2020-02-18 22:46:21 +05:30
Prasath Mani 9e3877270b Advanced Search
Mouse hover image preview
Upload error handling
Thumbnail view for folders containing images #283
How to search inside folders. #282
Search bar with regex matching #140
Subfolder Search Feature #132
2020-01-14 17:57:32 +05:30
Nguyen The Anh 0319b7b102 feat(/): add live image preview when user hovers the image file name (only when the number of files in current folder less than 500 files) (#244)
Co-authored-by: Prasath Mani <prasathmani@users.noreply.github.com>
2020-01-14 17:44:52 +05:30
Pascal 8b21009a47 Fix tiny typo (#276) 2020-01-06 07:46:43 +05:30
Prasath Mani 1c86942097 Redesign login screen, Removed remember me checkbox, Security vulnerability fix #270, User role have Preview and Search option #265, #222 2019-12-29 10:30:23 +05:30
Prasath Mani 9a499734c5
Merge pull request from GHSA-w72h-v37j-rrwr
* Fix the RCE vuln via Upload from URL

This commit attemps to fix the Remote Code Execution
(authenticated) via Upload from URL. Some notes about
the proposed solution:

* A new function (fm_is_file_allowed) has been created to
validate if the filename is allowed. This function gets the
the filename as parameter and returns true if it validates
as allowed. Otherwise returns false (the default).

* It's better to have such validatation(s) in one place
instead of spread all over the code. There are other places in
the application where the filename is validated and they should
all be refactored to call this function. Then we can focus
all needed validations in one place only!

NOTE: This refactoring was not done - the only goal was to fix
this security vulnerability only.

* The fm_is_file_allowed() function validates the filename
based on its extension only. No other validatation(s) have been
implemented in this commit.

* File extensions are assumed to be case-insensitive.
For example, php == PHP == Php == PhP, etc. This is consitent
with some web servers. Without this, the user will have to populate
the $allowed_extensions with all possible allowed combinations.

* Although, there is one drawback to the current solution, which
is that all files must have an extension to be uploaded. This is not
consitent with modern filesystems. Maybe a better solution would be
to automatically append an extension to the filename if no
extension has been found (e.g., .html or .txt which are generally
considered to be harmless). This must be decided by the
application's maintainers.

* Fix the RCE vulns via new/rename file

Sanitize the arguments to stat using escapeshellarg()

Co-authored-by: Jorge Morgado <jorge@morgado.ch>
2019-12-28 19:23:47 +05:30
Whale b84fdbf008 Compatible with macOS (#258) 2019-12-27 11:39:52 +05:30
RMKATBST 7c376df205 Fix for search function not working if "$hide_Cols=true" on non-Windows systems (#267)
Setting $hide_Cols=true while having FM_IS_WIN=false will lead to a "Type error" when setting up the dataTable. The desired page is generated, but the Search function does not work, as the dataTable is broken.

With this fix the dataTable is written accordingly, with either FM_IS_WIN or $hide_Cols set or unset.
2019-12-20 14:50:57 +05:30
Prasath Mani 7a7a44de9b Open document files? #262 2019-12-06 16:26:36 +05:30
Prasath Mani 3e19ba0243 No message / status / information when saving edited file #257 and when saving an edit show a warning ( alert ) #213 2019-11-29 12:26:25 +05:30
Prasath Mani bf8b715c13 Notice Error. #252 2019-11-15 12:21:31 +05:30
Prasath Mani 4a8bd014af Bug fix and PR #245, #241, #240 2019-11-05 16:50:15 +05:30
B Bharath Kumar Reddy a5b2b459cd Feature Font Size Choose Options / Bug Fix Settings not visible in auth=false (#240) 2019-11-05 16:32:25 +05:30
Nguyen The Anh 13e130c29f Show current process ID in Status bar + Make fm_get_filesize function much more concise (#245) 2019-11-05 16:27:57 +05:30
Lukas Lenhardt 57ac3391e5 Fixed help links (#238) 2019-10-04 12:44:05 +05:30
Prasath Mani 29ca36a18b Missing select all feature ? #234 2019-10-01 16:20:30 +05:30
Prasath Mani c76a3a2fc5 Updated new version vendor cdn links and Fixed - Bug when filename contains a space at the beginning #198 2019-09-24 18:17:09 +05:30
Roni 73abdcdaad echo "Folder" (#209)
{ echo "Folder"; } > { echo lng('Folder'); }
2019-08-23 08:12:57 +05:30
Manuel Martins 059c70e05e Update tinyfilemanager.php (#206)
FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant online_viewer - assumed 'online_viewer' (this will throw an Error in a future version of PHP) in /www/admin/index.php on line 1383
2019-08-22 11:26:32 +05:30
Prasath Mani c18051dd5b File upload error: uppercase and strtolower() #202 2019-07-31 09:39:02 +05:30
Prasath Mani b6f552a79c Cannot edit aspx File #200 2019-07-26 17:07:57 +05:30
Prasath Mani 3114fa92e3 Some language strings are missing. And other... #192
view file is insecure #187
Get files size (recursive) #186
There is no possibility for translation for some hints (title =) #185
View dirSize instead of word "Folder" #184
Document type detection #183
Stored Cross-site Scripting (XSS) Vulnerability detected in File Names #180
strings in code #177
Remove tracking #164
2019-07-23 12:56:01 +05:30
typewriter1 21094a66ee Fix spelling of "copyied" after copying file (#196)
Should be "copied".
2019-07-23 09:42:22 +05:30
Vebu 5386b89aaf Update tinyfilemanager.php (#194) 2019-07-23 09:42:00 +05:30
elhoussam 8d40ebcdd7 Improve Multilanguage Support (#179)
* Add Arabic Translation

* add some keywords and handling Fixed keywords [untranslated]

* add new translation words

* improve existing translation words
2019-07-23 09:40:26 +05:30
Yehuda Eisenberg ea29092aea Add Save by ajax request (#175)
Add Save by ajax request, Instead of saving it to a post request and reloading the page each time.
2019-07-23 09:39:00 +05:30
Prasath Mani 1696ebf0fc IP whitelisting and/or blacklisting #171
Add Microsoft Office online view option #169
2019-05-19 12:31:49 +05:30
Kevin @ Navigram 498804f8a5 Basic IP white- and blacklisting (#178) 2019-05-19 11:10:20 +05:30
Prasath Mani 4b4b48242e PHP Warning: count() #173 2019-05-13 15:59:02 +05:30
Prasath Mani f67a343f48 When uploading it doesnt override, insteads it crates a new filename #172
Add Custom Title and Favicon options #156
2019-05-13 15:48:29 +05:30
Daniel Kranich f956ae3abc Add Custom Title and Favicon options (#156)
Added variables so the admin can set a custom title and favicon.
2019-05-07 15:13:37 +05:30
Prasath Mani 7a9730dfe1 Added .MKV format support and minor ui changes, #163. 2019-05-03 16:47:35 +05:30
Prasath Mani ae971c8b99 Fix for path traversal vulnerability, reported by - @hhc0null/Hiroki MATSUKUMA 2019-04-03 17:20:23 +05:30
Prasath Mani 285b6b4882 Provide "previous" and "next" to navigate between previews #145
Cross site scripting (XSS) #141
RegEx error | function template #134
2019-03-28 17:06:42 +05:30
Prasath Mani a8c2fc66d6 prevent overwriting if uploaded file already exists #138,
IE11 aborts upload after 30s #137
2019-03-13 12:26:25 +05:30
Prasath Mani 622264042a Negative filesize on ARMv7 for files over 2GB #127
Max file size? #96
2019-03-03 15:30:47 +05:30
Prasath Mani da31717cff Negative filesize on ARMv7 for files over 2GB #127
Simplified Chinese translation #125
Max file size? #96
2019-02-28 15:35:28 +05:30
Mark Shi e0cc54b286 Add Simplified Chinese support (#122)
* Add Simplified Chinese support

And distinguish it from Traditional Chinese.

* Add two fields for translation.

* Add two fields for translation.

* Translated.
2019-01-28 22:24:05 +05:30
Prasath Mani 7a0de24a61 Fix : User's sub folder problem #120 2019-01-20 17:02:01 +05:30
Prasath Mani 2a390b2247 down file error when larger than php memory limited #110 and Not looking good on phones #93 2019-01-18 17:12:20 +05:30
Prasath Mani 09f688c625 Saving settings doesn't save #116 2019-01-17 12:34:54 +05:30
Prasath Mani f26977adb3 Default Languages loading issue fix 2019-01-10 16:23:02 +05:30
Prasath Mani 8802b048b3 Added Version Check
Added new Translation JSON file
New languages added - Spanish, German, Thailand and Chinese
Removed languages from tinyfilemanager.php file
Updated IDE languages and themes
2019-01-06 16:59:02 +05:30
Prasath Mani 125e35ed83
Merge branch 'master' into spanish-lang 2019-01-06 15:44:09 +05:30
Prasath Mani 98902b6b80
Merge branch 'master' into master 2019-01-06 15:41:38 +05:30
Prasath Mani 380a6f2877
Merge pull request #104 from emilengler/master
Add German language
2019-01-06 15:39:46 +05:30
jopiortiz 373d04b2ef
Crear , looks better 2019-01-04 01:03:30 -03:00
Joaquin c7708f371f Spanish Language
- Minor fix on the Search input placeholder
2019-01-04 00:32:28 -03:00
Prasath Mani ba9826fe9c Added check latest version 2018-12-31 14:36:03 +05:30
Prasath Mani 221bc96882 Added Partition size and Memory used #111 2018-12-25 21:48:41 +05:30
Alessandro Marinuzzi 90c079882d
improved memory usage + added translations
improved memory usage + added translations
2018-12-25 15:11:20 +01:00
Alessandro Marinuzzi c22e694e7d
improved memory usage
improved memory usage
2018-12-25 14:32:03 +01:00
Alessandro Marinuzzi 8f9da1cb5e
Added Memory Used
Added Memory Used
2018-12-25 14:12:58 +01:00
Prasath Mani c413573952 Improve embed and UI issues 2018-12-22 14:51:06 +05:30
Prasath Mani 89fb960679 Modified UI - Pwd change 2018-12-14 01:20:25 +05:30
Prasath Mani fb7c4fcebd Modified UI - file upload from url #98 and Code refactor 2018-12-14 00:02:25 +05:30
Prasath Mani 9fdfdbfe94 Added - file upload from url #98
Fix: issues to rename files with single quote #105
Fix: Dropzone default timeout 30 seconds #102, #96, #75
Fix:  XSS cross-site attack screen (Chrome) #101
2018-12-13 00:38:16 +05:30
Emil Engler 876282d006
Add German language 2018-12-10 18:22:24 +01:00
Mr. Wan f7240516ca
Update tinyfilemanager.php 2018-12-09 09:39:33 +07:00
Prasath Mani 1a9bf95920 Fix: Not looking good on phones #93 2018-12-06 12:51:29 +05:30
Prasath Mani 9eda119235 Added Editor Toolbar - Themes, Document Mode, Search, Fullscreen, Undo, Redo, ... 2018-12-03 23:58:25 +05:30
Prasath Mani 1ca5add891 Added Russian Language 2018-12-02 14:49:04 +05:30
Prasath Mani 4f40e85604 Fix: Not looking good on phones #93 2018-12-01 13:58:28 +05:30
Prasath Mani 39bec20b7e Fix: undefined constant password_verify #87 and #92, #91 2018-12-01 08:43:24 +05:30
Alessandro Marinuzzi 479a4a873d
Added language entry in list
Added language entry in list
2018-11-29 19:40:24 +01:00
Alessandro Marinuzzi 7f1258c050
fixed $tr['en'] with $tr['it']
Fixed Italian language
2018-11-29 19:20:44 +01:00
simon511000 c1b8bfd6ad
Update tinyfilemanager.php 2018-11-29 17:31:57 +01:00
Alessandro Marinuzzi 0c0d9e24b8
Update tinyfilemanager.php
Added Italian language
2018-11-29 16:06:41 +01:00