Jerome Jutteau
1581d41cc2
[BUGFIX] Manage PHP configuration with "unlimited" upload
...
Setting `post_max_size` and `upload_max_filesize` PHP options to "0" is unmanaged by Jirafeau.
It tries to send 0 bytes and Javascript have some zero division errors.
This commit will use $max_upload_chunk_size_bytes option when available.
If $max_upload_chunk_size_bytes is also set to zero, chunk size is set an arbitrary value of 10M.
Non html-5 users will not have size limitation shown.
fixes #272
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-04 23:44:41 +02:00
Jerome Jutteau
1294029019
[BUGFIX] Print nice error when install.php is missing and we need it.
...
Also show header when printing this type of fatal error
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 17:15:17 +02:00
Jerome Jutteau
6eca3aa915
[BUGFIX] Limit upload chunk size to a reasonable value
...
Not really a bug but avoid users to fall in php configuration traps.
ref #303
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 15:33:55 +02:00
Edwin Bos
c7f776c8b9
Implement expiry after a fortnight (2 weeks).
2022-04-07 07:30:17 +00:00
Jerome Jutteau
8665ea5fc1
[BUGFIX] setup autocomplete field for passwords
...
closes #265
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2021-05-18 09:01:37 +02:00
Jerome Jutteau
b6f423726c
[TASK] run php-cs-fixer
...
php-cs-fixer fix --rules=@PSR2 .
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-05 13:45:04 +01:00
Jerome Jutteau
78a1c41c40
[TASK] fix email of Jérôme Jutteau
...
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-15 21:44:21 +01:00
Erik Lundin
208418c2e0
Make one time download optional
2020-04-07 22:17:15 +02:00
Erik Lundin
a00401257a
Fix upload IP check
...
If no IP addresses are listed at 'upload_ip_nopassword', index.php won't
show any login form and indicate the session as authenticated. During
the actual upload, script.php will show the error 'Error 2: No password
nor allowed IP'.
The reason is that jirafeau_challenge_upload_ip returns true if the
supplied IP whitelist is empty, but uploading without a password doesn't
work this way (and shouldn't).
I took the liberty to split 'jirafeau_challenge_upload_ip' into one
function for the normal IP check, and one for checking if allowed to
upload without a password. Having function names that clearly
communicates the intent makes it easier to avoid bugs.
2019-11-12 02:17:34 +01:00
Jerome Jutteau
c3114e0b2e
[TASK] Size checking adjustments
...
- identation
- print GB when >= 1024
- show limitation in MB when > 0
- hide text under file selection when there is no limit
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2019-11-12 00:10:56 +01:00
j-broo
0b85af176c
Propose change of copy icon to Unicode "clipboard" icon, the current icon does not display properly in many browsers. Clipboard icon also makes more sense - copy link to clipboard. https://www.compart.com/en/unicode/U+1F4CB
2019-11-11 23:23:47 +01:00
j-broo
18a49e2771
Update for installations that allow large files - If file is over 1 GB, display units in GB. Avoids displaying strings like "3000 MB"
2019-11-11 10:17:01 +00:00
sebastien
486d4f5ea5
[BUGFIX] allow no ip user to connect and stay connected
2019-10-21 21:36:13 +02:00
sebastien
d09ba57608
[BUGFIX] Replace text by password field
2019-10-21 21:36:13 +02:00
Matthieu Schneider
7578ca7e1d
[FEATURE] No logout button for upload_ip_nopassword
2019-09-05 23:35:39 +02:00
Matthieu Schneider
6c160f2205
[FEATURE] Add check config for upload_ip_nopassword
2019-09-05 23:35:39 +02:00
Jerome Jutteau
0325cfa4d5
[BUGFIX] Change scissors character to copy symbol
...
fix #187
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2019-01-27 13:27:43 +01:00
Jerome Jutteau
7496abe3c1
[BUGFIX] Set correct license name for LibreJS
...
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2019-01-27 13:27:42 +01:00
Jerome Jutteau
3017f09505
[TASK] clean some spaces and tabs
...
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2018-05-11 23:57:50 +02:00
Jerome Jutteau
35f7adea8c
[FEATURE] Advertise javascript license for LibreJS
...
closes #172
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2018-05-11 23:56:58 +02:00
Jerome Jutteau
30a3728e30
[BUGFIX] move browser error to separate lang item
...
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2018-02-16 18:35:50 +01:00
Jerome Jutteau
2dc4984ad5
[TASK] set a translation string id for each element
...
closes #158
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2018-02-16 18:18:59 +01:00
Jerome Jutteau
b2186ae902
[TASK] Set back plain text URL of links
...
closes #157
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2018-02-16 17:11:26 +00:00
Jerome Jutteau
8d6002fa6a
[BUGFIX] run session_start before outputing any html
...
And avoid some warnings when a user password is configured.
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2018-02-09 23:37:39 +01:00
Jerome Jutteau
d240b793e5
[BUGFIX] fix user password prompt html
...
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2018-02-09 23:37:29 +01:00
Jerome Jutteau
b8529b7920
[FEATURE] Add a copy button next to links
...
closes #129
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2017-07-09 17:05:06 +02:00
Jerome Jutteau
75c98902b1
[BUGFIX] Prevent object ProgressEvent Error
...
This is done by removing unnecessary usage of web_root URL.
closes #127
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2017-07-09 14:18:34 +02:00
Dan Untenzu
7efbeeb865
[FEATURE] Styles: Set IDs for upload result links
...
Set IDs for all links shown after successfull upload.
This way admins may show/hide these links with CSS only.
Refs #93
2017-03-30 16:03:42 +02:00
Dan Untenzu
fd3aaad433
[FEATURE] Styles: Add classes to forms
...
Enable better styling for classes.
2017-03-30 16:03:42 +02:00
Dan Untenzu
b402561271
[BUGFIX] Remove false IP challenge to allow uploads again
...
The upload form currently has a broken IP check
which dissallows all uploads even if no IP restrictions
are configured in the config.
Replace the wrong check and add some code comments
to make this authorization more readable.
Refs #113 #107 #111
2017-03-17 17:28:56 +01:00
Jerome Jutteau
71e621e81a
[BUGFIX] fix broken password auth and deny access
...
ref #107
closes #111
2017-03-09 18:04:59 +00:00
Dan Untenzu
89d002baaa
[FEATURE] Follow up: Remove further form targets
...
Follow up for commit a12b04d2670d2916008e53b4f5a2cc5f158cb998.
Remove further form action targets, if these forms should be send
to the same page anyway. In this case we may safely omnit the
action attribute and safe some path constructions.
2017-02-23 18:34:20 +01:00
Marc Hauswirth
f65244fc26
ip or password (see issue 107)
2017-02-23 18:34:20 +01:00
Dan Untenzu
96707e02b8
[FEATURE] Switch to PSR-2
...
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.
Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.
1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
Refs #103
2017-02-23 18:34:20 +01:00
Dan Untenzu
af7e43a4a3
[FEATURE] Move config include into settings file
...
Move the include of the original and the local
configuration file into the settings file to reduce one
includes in each file, have all settings in one place
and remove unneccessary code from the config file
(which makes it easier to copy and change it).
2017-01-19 19:03:03 +00:00
Jerome Jutteau
4b8e9e4372
Fix missing possible values in expiration dates
...
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2017-01-13 18:33:40 +00:00
Dan Untenzu
dfa4d53376
[FEATURE] Set default expiration time in config
...
Enable the admin to set a default expiration time
in the configuration time. This way the upload form
may offer "hour", "day", "month" as available expiration
times and "day" is preselected.
Default in the original configuration is "month".
Refs #57
2017-01-13 17:48:19 +00:00
Dan Untenzu
deeb132336
[TASK] CGL: Remove whitespaces
...
Remove unwanted whitespace
2017-01-13 17:43:23 +00:00
Jérôme
261af8ac3b
Merge branch 'php-minor' into 'master'
...
Minor changes to some PHP files
See merge request !7
2015-07-16 08:32:48 +00:00
Jerome Jutteau
c41fa96e82
fix header printing on error
...
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-07-16 10:29:53 +02:00
Spanti Nicola (RyDroid)
60530d95cc
Minor changes to some PHP files
2015-07-11 16:24:31 +02:00
Jerome Jutteau
d9647e1afe
manage visitor IP behind reverse proxies, refs #36
...
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-05-07 12:50:04 +02:00
Jerome Jutteau
364d1c4437
add optional IP authentication for uploaders
...
closes #34
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-04-27 20:10:23 +02:00
Jerome Jutteau
777eeaa386
add mailto link with image next to download page link
...
closes #31
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-04-25 16:23:58 +02:00
Jerome Jutteau
8999b491d1
media/courgette: cleaner design of links page
...
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-04-25 11:53:52 +02:00
Jerome Jutteau
05833d4c31
lib: simplify link deisplay function
...
why this was so complicated ?
Signed-off-by: Jerome Jutteau <mojo@couak.net>
2015-04-25 11:26:35 +02:00
Jerome Jutteau
90462b6a06
remove option which shows download page
...
This commit make Jirafeau to always have the download page link available.
This option is maybe not really usefull anymore as the user already have a
download link and a preview link after the upload.
2015-04-07 13:36:45 +02:00
Jerome Jutteau
fd69ffa2b6
closes #11 show speed and time estimation during upload
2015-03-21 11:12:52 +01:00
Jerome Jutteau
29ffce500f
index.php: inverse option order for time limitation
2015-03-20 13:19:29 +01:00
Jerome Jutteau
c5571d9237
Fixes #7 Jirafeau can now limit file size
...
- Can limit file size whatever upload method is used
- Add a <div> for error handling
- Fix courgette style
2015-03-12 20:16:34 +01:00