Skip to content

Commit

Permalink
Do not strip spaces on file upload, consistent with check
Browse files Browse the repository at this point in the history
  • Loading branch information
abeverley committed Oct 2, 2024
1 parent 9834379 commit ea60e58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/GADS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,8 @@ post '/api/file/?' => require_login sub {
# Remove any invalid characters from the new name - this will possibly be changed to an error going forward
# Due to dragging allowing (almost) any character it is decided that this would be best so users can input what
# they want, and the text be stripped on rename server-side
$filename =~ s/[^a-zA-Z0-9\._\-\(\)]//g;
# Note: This regex should mirror the regex in GADS::Filecheck::check_name()
$filename =~ s/[^a-zA-Z0-9\._\-\(\) ]//g;

my $file;
if (process( sub { $file = rset('Fileval')->create({
Expand Down

0 comments on commit ea60e58

Please sign in to comment.