clean attachment filenames, #13843
[freeside.git] / httemplate / view / cust_main / attachments.html
index dbb29a7..718cf76 100755 (executable)
     <TR>
       <% note_datestr($attach,$conf,$bgcolor) %>
       <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
-        &nbsp;<% $attach->otaker%>
+        &nbsp;<% $attach->usernum ? $attach->access_user->name : $attach->otaker %>
       </TD>
       <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
-       &nbsp;<% $attach->filename %>
+       &nbsp;<% $attach->filename |h %>
       </TD>
       <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
-       &nbsp;<% $attach->title %>
+       &nbsp;<% $attach->title |h %>
       <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
-       &nbsp;<% $attach->mime_type %>
+       &nbsp;<% $attach->mime_type |h %>
       </TD>
       <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
        &nbsp;<% size_units( $attach->size ) %>
 
 my $conf = new FS::Conf;
 my $curuser = $FS::CurrentUser::CurrentUser;
-
+die "access denied" if !$curuser->access_right('View attachments');
 my(%opt) = @_;
 
 my $custnum = $opt{'custnum'};