[Koha-bugs] [Bug 6874] File upload in MARC

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 7 12:20:25 CEST 2011


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6874

Julian Maurice <julian.maurice at biblibre.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5440|0                           |1
        is obsolete|                            |

--- Comment #7 from Julian Maurice <julian.maurice at biblibre.com> 2011-10-07 10:20:25 UTC ---
Created attachment 5764
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5764
Patch

New rebased patch with some fixes.

@Sébastien:

1/ Fixed.

2/ If you are talking about this line:
    my $template_name = $result || $delete ? "upload_delete_file.tt" :
"upload.tt";
The '||' operator have higher precedence than '?' so in reality it's equivalent
to
    my $template_name = ($result || $delete) ? "upload_delete_file.tt" :
"upload.tt";
I added parentheses to avoid confusion

3/ '../' strings are now removed from filename ($result)

4/ Added chmod 0644 on created files to avoid script execution, and removed
leading dot on filename to avoid uploading files like .htaccess

5/ err... copy/paste error. The second elsif condition is 'subfiel.is_file'


@Robin:

Not sure to understand your first question. What do you mean when you say
"multiple instances"?

You can set uploadPath to be external to the server tree location, and change
the apache configuration to add a directory alias.

Added copyright header and a brief perldoc section.

-- 
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list