This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, 6.0 has been updated
via d5bab9061182a965e1c92689a3c94be9a3bcdabb (commit)
from a3b964b3574f32dfb460860a582abc67b680609e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d5bab9061182a965e1c92689a3c94be9a3bcdabb
commit d5bab9061182a965e1c92689a3c94be9a3bcdabb
Author: Franck Villaume <[email protected]>
Date: Fri Nov 25 15:09:13 2016 +0100
fix [#838] error message on wrong characters in filename
diff --git a/src/CHANGES b/src/CHANGES
index 9f67c71..0a4cf34 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -1,5 +1,6 @@
FusionForge 6.0.5:
* Forum: fix redirection cache [#835] & [#836] (TrivialDev)
+* FRS: fix error message on file upload with accent in filename [#838]
(TrivialDev)
* Plugin SCM SVN: fix activity when SVN repository is private [#813]
(TrivialDev)
* Plugin SCM SVN: fix support old svn clients (Inria)
* Plugin SCM Git: fix activity when Git repository is private [#825]
(TrivialDev)
diff --git a/src/common/frs/include/frs_utils.php
b/src/common/frs/include/frs_utils.php
index a6f9710..4f295c8 100644
--- a/src/common/frs/include/frs_utils.php
+++ b/src/common/frs/include/frs_utils.php
@@ -137,7 +137,9 @@ function frs_add_file_from_form($release, $type_id,
$processor_id, $release_date
$filechecks = false;
- if ($userfile && is_uploaded_file($userfile['tmp_name']) &&
util_is_valid_filename($userfile['name'])) {
+ $filenamecheck = util_is_valid_filename($userfile['name']);
+
+ if ($userfile && is_uploaded_file($userfile['tmp_name']) &&
$filenamecheck) {
$infile = $userfile['tmp_name'];
$fname = $userfile['name'];
$move = true;
@@ -152,7 +154,7 @@ function frs_add_file_from_form($release, $type_id,
$processor_id, $release_date
return _('The uploaded file was only partially
uploaded.');
break;
default:
- return _('Unknown file upload error.');
+ return _('Unknown file upload error. => ');
break;
}
} elseif (forge_get_config('use_ftp_uploads') && $ftp_filename &&
util_is_valid_filename($ftp_filename) &&
is_file($upload_dir.'/'.$ftp_filename)) {
@@ -173,6 +175,8 @@ function frs_add_file_from_form($release, $type_id,
$processor_id, $release_date
$filechecks = true;
} elseif ($userfile && $userfile['error'] == UPLOAD_ERR_NO_FILE) {
return _('Must select a file.');
+ } elseif ($userfile && $filenamecheck) {
+ return _('Invalid characters in file name.');
}
if ($filechecks) {
-----------------------------------------------------------------------
Summary of changes:
src/CHANGES | 1 +
src/common/frs/include/frs_utils.php | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits