<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Mangal;
        panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
@font-face
        {font-family:"Segoe UI Symbol";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:Georgia;
        panose-1:2 4 5 2 5 4 5 2 3 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Georgia",serif;
        color:#222A35;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Thanks Matthew,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I don’t know exactly why, I haven’t taken the time to analyze your regex, but this didn’t work for me. <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I used this instead, and it seems to do the trick. <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'>$filepath = (split(/\\/, $filepath))[-1];<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks for pointing out where I had to look&nbsp;!<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Robin<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></a></p><span style='mso-bookmark:_MailEndCompose'></span><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='mso-fareast-language:FR'>De&nbsp;:</span></b><span style='mso-fareast-language:FR'> Matthew Kerwin [mailto:matthew.kerwin@qut.edu.au] <br><b>Envoyé&nbsp;:</b> 11 janvier 2018 20:54<br><b>À&nbsp;:</b> eprints-tech@ecs.soton.ac.uk<br><b>Objet&nbsp;:</b> Re: [EP-tech] Bug when uploading files<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'>Hi there,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'>I remember getting frustrated at this once, so I hacked </span><span lang=EN-AU style='font-family:"Courier New";color:#222A35'>perl_lib/EPrints/System.pm</span><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'> in </span><span lang=EN-AU style='font-family:"Courier New";color:#222A35'>sub sanitise</span><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'>:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span lang=EN-AU style='font-family:"Courier New";color:#222A35'>$filepath =~ s!.*/(?=.)!!;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'>It’s running in production, but I’ve never looked into it since doing that half a year ago. &nbsp;It was a bit radical.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'>Cheers<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN-AU style='font-size:6.0pt;font-family:"Courier New";color:#003366;mso-fareast-language:EN-AU'>-- <o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><b><span lang=EN-AU style='font-size:10.0pt;font-family:"Calibri Light",sans-serif;color:#1F4E79;mso-fareast-language:EN-AU'><a href="http://staff.qut.edu.au/details?id=kerwinm"><span style='color:#1F4E79;text-decoration:none'>Matthew</span><span style='color:#1F4E79;font-weight:normal;text-decoration:none'>&nbsp;</span><span style='color:#1F4E79;text-decoration:none'>Kerwin</span></a></span></b><b><span lang=EN-AU style='font-size:10.0pt;font-family:"Calibri Light",sans-serif;color:#404040;mso-fareast-language:EN-AU'>&nbsp;</span></b><span lang=EN-AU style='font-size:10.0pt;font-family:"Calibri Light",sans-serif;color:#404040;mso-fareast-language:EN-AU'>|&nbsp;Team Leader<b>&nbsp;</b>|&nbsp;ITS-EIS&nbsp;|&nbsp;<u><a href="https://map.what3words.com/cards.reader.steer"><span style='color:#404040'>KG-SYN</span></a></u>-2.32&nbsp;|&nbsp;QUT</span><span lang=EN-AU style='font-size:7.5pt;font-family:"Calibri Light",sans-serif;color:#404040;mso-fareast-language:EN-AU'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-AU style='font-size:7.5pt;font-family:"Calibri Light",sans-serif;color:#404040;mso-fareast-language:EN-AU'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-AU style='font-size:10.0pt;font-family:"Segoe UI Symbol",sans-serif;color:#00B050;mso-fareast-language:EN-AU'>&#128511;</span><span lang=EN-AU style='font-size:10.0pt;font-family:"Arial Narrow",sans-serif;color:#00B050;mso-fareast-language:EN-AU'> <i>Please consider the Moyai before deleting this email.</i></span><span lang=EN-AU style='color:#222A35;mso-fareast-language:EN-AU'><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-AU style='font-family:"Georgia",serif;color:#222A35'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:EN-AU'>From:</span></b><span lang=EN-US style='mso-fareast-language:EN-AU'> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">eprints-tech-bounces@ecs.soton.ac.uk</a> [<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk">mailto:eprints-tech-bounces@ecs.soton.ac.uk</a>] <b>On Behalf Of </b>Robin Sylvestre<br><b>Sent:</b> Friday, 12 January 2018 06:41<br><b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a><br><b>Subject:</b> [EP-tech] Bug when uploading files<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-AU><o:p>&nbsp;</o:p></span></p><p class=MsoNormal>Hello&nbsp;!<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>We have found a bug in Eprints 3.3.13 when uploading files from Internet Explorer.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>IE has an option that allows the full path of files to be sent along the filename when uploading files. With this option enabled, and when uploading files from a network share (i.e. <a href="file://server/share/file.ext">\\server\share\file.ext</a>) the full path of the file is appended to the filename, with underscores replacing backslashes (i.e. __server_share_file.ext). When uploading from a local drive, everything works fine. This is set in custom security settings. Maybe other browsers have this option too&nbsp;?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I tried to find where the filename gets set when uploading the file, but I only managed to hide the path from the upload progress bar (in 88_uploadmethod_file.js). I figure the filename must be set by a server script. Maybe in perl_lib/EPrints/DataObj/File.pm&nbsp;? <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Can someone help us correct this bug&nbsp;?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks&nbsp;!!<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><b><span lang=FR-CA style='font-size:14.0pt;color:#FA961E;mso-fareast-language:FR'>Robin Sylvestre</span></b><span lang=FR-CA style='mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CA style='color:black;mso-fareast-language:FR'>Services techniques et systèmes informatisés</span><span lang=FR-CA style='mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CA style='color:black;mso-fareast-language:FR'>Bibliothèque de l’École Polytechnique de Montréal</span><span lang=FR-CA style='mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal><span lang=FR-CA style='color:black;mso-fareast-language:FR'>514-340-4711 poste 3743</span><span lang=FR-CA style='mso-fareast-language:FR'><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>