<div dir="ltr"><div>I can also confirm the fix from Jules has worked, Thanks for the help all, as for the other questions reCAPTCHA is fine for our use. <br><br></div><div>Cheers<br></div><div>C<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 March 2016 at 18:29, Keith Erekson <span dir="ltr">&lt;<a href="mailto:kbe2@lehigh.edu" target="_blank">kbe2@lehigh.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <br>
    -----BEGIN PGP SIGNED MESSAGE-----<br>
    Hash: SHA256<br>
    <br></span>
    I can confirm that this fixes the issue.<br>
    <br>
    For the Debian package, here is the patch for
    /opt/zendto/www/pickup.php:<br>
    <br>
    - --- pickup.php.old    2016-03-02 13:25:27.000000000 -0500<br>
    +++ pickup.php    2016-03-02 13:25:30.000000000 -0500<br>
    @@ -180,7 +180,7 @@<br>
     <br>
         $claimID = preg_replace(&#39;/[^a-zA-Z0-9]/&#39;, &#39;&#39;, $claimID);<br>
         $claimPasscode = preg_replace(&#39;/[^a-zA-Z0-9]/&#39;, &#39;&#39;,
    $claimPasscode);<br>
    - -    if ( isset($recipEmail) &amp;&amp; !
    preg_match($theDropbox-&gt;validEmailRegexp(),$recipEmail) ) {<br>
    +    if ( isset($emailAddr) &amp;&amp; !
    preg_match($theDropbox-&gt;validEmailRegexp(),$emailAddr) ) {<br>
           $emailAddr = &#39;INVALID&#39;;<span class=""><br>
         }<br>
     <br>
    <br>
    <br>
    On 03/02/2016 12:06 PM, Jules wrote:<br>
    </span><span style="white-space:pre-wrap"><span class="">&gt; Hi guys!<br>
      &gt;<br>
      &gt; Sorry about this one. The fault isn&#39;t actually in that line,
      it&#39;s just below it where it says this:<br>
      &gt;<br>
      &gt;     if ( isset($recipEmail) &amp;&amp; !
      preg_match($theDropbox-&gt;validEmailRegexp(),$recipEmail) ) {<br>
      &gt;       $emailAddr = &#39;INVALID&#39;;<br>
      &gt;     }<br>
      &gt;<br>
      &gt; Those 2 &quot;$recipEmail&quot; should of course both be &quot;$emailAddr&quot;.<br>
      &gt;<br>
      &gt; I did carefully check the email address was valid, but put in
      the wrong variable name to check. :-(<br>
      &gt; My bad.<br>
      &gt;<br>
      &gt; That should fix it. No need to restart httpd or anything,
      just save the file and reload the page.<br>
      &gt;<br>
      &gt; Cheers,<br>
      &gt; Jules.<br>
      &gt;<br>
      &gt; P.S. Sorry I haven&#39;t done an update in *ages*. 2 questions:
      (1) What other outstanding bugs/patches are there?, and (2) Is it
      worth me re-writing the areyouahuman CAPTCHA code for their new
      one, or is everyone happy with the Google one (reCAPTCHA) that is
      there already?<br>
      &gt;<br>
      &gt; On 02/03/2016 15:28, Karl Bundy wrote:<br>
      &gt;&gt;<br>
      &gt;&gt; Hi everyone,<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; It appears that the issue is due to the fact that the
      email querystring variable is not being sanitized before being
      used.  I am not a skilled programmer, but I was able to make this
      simple change to the pickup.php file and it appears to have
      resolved this XSS issue.  Please use this at your own risk, as it
      appears to work for me, but your mileage may vary ;)<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; In the pickup.php file change this line:<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; $emailAddr =
isset($_POST[&#39;emailAddr&#39;])?$_POST[&#39;emailAddr&#39;]:(isset($_GET[&#39;emailAddr&#39;])?$_GET[&#39;emailAddr&#39;]:NULL);<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; to this:<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; $emailAddr =
str_replace(&#39;&quot;&#39;,&#39;&#39;,isset($_POST[&#39;emailAddr&#39;])?$_POST[&#39;emailAddr&#39;]:(isset($_GET[&#39;emailAddr&#39;])?$_GET[&#39;emailAddr&#39;]:NULL));<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; Save the file, and then test again.<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; ---Karl Bundy<br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br></span>
      &gt;&gt; *From:*<a href="mailto:zendto-bounces@zend.to" target="_blank">zendto-bounces@zend.to</a>
      [<a href="mailto:zendto-bounces@zend.to" target="_blank">mailto:zendto-bounces@zend.to</a>] *On Behalf Of *Der PCFreak<br>
      &gt;&gt; *Sent:* Wednesday, March 02, 2016 6:10 AM<br>
      &gt;&gt; *To:* <a href="mailto:zendto@zend.to" target="_blank">zendto@zend.to</a><br>
      &gt;&gt; *Subject:* Re: [ZendTo] XSS<div><div class="h5"><br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt; Hi,<br>
      &gt;&gt;<br>
      &gt;&gt; Barracuda offers their &quot;Barracuda Vulnerability Manager&quot;
      for free at the moment and I tested it.<br>
      &gt;&gt; <a href="https://bvm.barracudanetworks.com/" target="_blank">https://bvm.barracudanetworks.com/</a><br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; Here some of the results pointed at my ZendTo
      installation:<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; Reflected Cross-Site Scripting<br>
      &gt;&gt; ==============================<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The emailAddr parameter was submitted with the value
      &quot;--&gt;&lt;script&gt;prompt(12345)&lt;/script&gt;lNYCi&lt;!--, and
      the string was echoed verbatim in the output, showing that there
      is a reflected XSS vulnerability.<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The auth parameter was submitted with the value
      &quot;--&gt;&lt;script&gt;prompt(12345)&lt;/script&gt;HyNzQ&lt;!--, and
      the string was echoed verbatim in the output, showing that there
      is a reflected XSS vulnerability.<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The emailAddr parameter was submitted with the value
      &quot;--&gt;&lt;script&gt;prompt(12345)&lt;/script&gt;x7RXs&lt;!--, and
      the string was echoed verbatim in the output, showing that there
      is a reflected XSS vulnerability.<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The auth parameter was submitted with the value
      &quot;--&gt;&lt;script&gt;prompt(12345)&lt;/script&gt;WqYcq&lt;!--, and
      the string was echoed verbatim in the output, showing that there
      is a reflected XSS vulnerability.<br>
      &gt;&gt;<br>
      &gt;&gt; HTML-Injection<br>
      &gt;&gt; ==============<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The emailAddr parameter was submitted with the value
      &lt;h1&gt;tjkgr&lt;/h1&gt;, and this value was echoed back
      verbatim in the resulting page.<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The auth parameter was submitted with the value
      &lt;h1&gt;xt90x&lt;/h1&gt;, and this value was echoed back
      verbatim in the resulting page.<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The emailAddr parameter was submitted with the value
      &lt;h1&gt;zrjja&lt;/h1&gt;, and this value was echoed back
      verbatim in the resulting page.<br>
      &gt;&gt; View Full HTTP Request and Response<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="https://your.url.tld/pickup.php" target="_blank">https://your.url.tld/pickup.php</a><br>
      &gt;&gt; Issue Detail<br>
      &gt;&gt; The auth parameter was submitted with the value
      &lt;h1&gt;anhxx&lt;/h1&gt;, and this value was echoed back
      verbatim in the resulting page.<br>
      &gt;&gt;<br>
      &gt;&gt; Kind regards<br>
      &gt;&gt;<br>
      &gt;&gt; PCFreak<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; On 01.03.2016 20:14, Chris Venter wrote:<br>
      &gt;&gt;<br>
      &gt;&gt;     Hi<br>
      &gt;&gt;<br>
      &gt;&gt;     Our security audit has highlighted a possible
      reflected cross site scripting error on the pickup.php page,to
      test we ran<br>
      &gt;&gt;<br>
      &gt;&gt;     <a href="https://server_name/pickup/php?emailAddr=test" target="_blank">https://server_name/pickup/php?emailAddr=test</a>&quot;
      /&gt;&lt;script&gt;alert(&#39;XSS Test&#39;)&lt;/script&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;      <br>
      &gt;&gt;<br>
      &gt;&gt;     Can anyone else confirm if this is an issue?<br>
      &gt;&gt;<br>
      &gt;&gt;     Thanks<br>
      &gt;&gt;<br>
      &gt;&gt;     CJ<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;     _______________________________________________<br>
      &gt;&gt;<br>
      &gt;&gt;     ZendTo mailing list<br>
      &gt;&gt;<br></div></div>
      &gt;&gt;     <a href="mailto:ZendTo@zend.to" target="_blank">ZendTo@zend.to</a> <a href="mailto:ZendTo@zend.to" target="_blank">&lt;mailto:ZendTo@zend.to&gt;</a><span class=""><br>
      &gt;&gt;<br>
      &gt;&gt;    
      <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><br>
      &gt;&gt;<br>
      &gt;&gt;  <br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; _______________________________________________<br>
      &gt;&gt; ZendTo mailing list<br>
      &gt;&gt; <a href="mailto:ZendTo@zend.to" target="_blank">ZendTo@zend.to</a><br>
      &gt;&gt; <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><br>
      &gt;&gt;<br>
      &gt;&gt; Jules<br>
      &gt;&gt;<br>
      &gt;&gt; -- <br>
      &gt;&gt; Julian Field MEng MBCS CITP CEng<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; <a href="http://www.Zend.To" target="_blank">www.Zend.To</a><br>
      &gt;&gt; Twitter: @JulesFM<br>
      &gt;&gt; PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947
      1415 B654<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; ZendTo mailing list<br>
      &gt; <a href="mailto:ZendTo@zend.to" target="_blank">ZendTo@zend.to</a><br>
      &gt; <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a></span></span><br><span class="">
    <br>
    -----BEGIN PGP SIGNATURE-----<br>
    Version: GnuPG v1.4.12 (GNU/Linux)<br>
    <br></span>
    iQEcBAEBCAAGBQJW1zDuAAoJEMdFVhhDm2SFvU4H/3ql/g9ugTk9c4oclyU9ZKeX<br>
    oOd0/ZIJ0wQLEqejDkXVj8QzP2651C+8RBt96vGJMQx7N7SowfGUqOQZtKwK2hlA<br>
    B5bGzI/MXcpvolhb7GCI5LlBnfmau5L1qtRzqHJbtXgoW5k2TicEXzKpOUZwj9/J<br>
    y8HTmO8f/rqUREG3kdmQrLsqHsAbUzz63uV8ocLLPTsDq9hBNMrLlW/OtrWJ3sWk<br>
    MvKTh6PGwYMl4nLiObGoA0hYPnzzTYNv2kPLG8XeZqSp/btr3tPPadZ6NmoLYyDm<br>
    uX6G3ywdW5jAJZj2oUHu7hc6FCyItV/WewvdVDvuagecDmuVTB8zOF5J/rpQkOM=<br>
    =rcZ8<br>
    -----END PGP SIGNATURE-----<br>
    <br>
  </div>

<br>_______________________________________________<br>
ZendTo mailing list<br>
<a href="mailto:ZendTo@zend.to">ZendTo@zend.to</a><br>
<a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto" rel="noreferrer" target="_blank">http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto</a><br></blockquote></div><br></div>