[ZendTo] PHP Fatal Error when downloading medium size encrypted files

Jules Field Jules at Zend.To
Fri Jan 18 15:10:30 GMT 2019


In which case it appears to be either reading the number 0 from the file 
(that value should be 4), or it's failing to read the file despite 
having successfully opened it.

Compared to the number of bytes in the actual file you uploaded, the 
encrypted version of the file should be slightly longer than the original.

Please can you look in /var/zendto/dropoffs/<the-ClaimID> to see how big 
the files are and check they correspond to the unencrypted files + a bit.

If that looks okay, then once you've found the relevant file in the 
relevant drop-off directory, please do
od -c the-file-here | head -20
and send me the output (it won't give anything secret away, don't worry).

Then I can check if the encrypted file header looks vaguely right or not.

Cheers,
Jules.

On 18/01/2019 12:50, davide.mosca8 via ZendTo wrote:
> Thanks for your reply.
> I have 4GB RAM and 4GB of swap on the box
>
> Davide
>
> Il giorno ven 18 gen 2019 alle ore 13:40 Jules Field via ZendTo 
> <zendto at zend.to <mailto:zendto at zend.to>> ha scritto:
>
>     Davide,
>
>     How much RAM has your ZendTo box got?
>     The crypto library does require quite a bit of RAM, so if you only
>     have 1 GB then I would at least add some more swap space.
>     Obviously adding more RAM would be better (2GB or 4GB should be
>     plenty), but possibly more costly.
>
>     Cheers,
>     Jules.
>
>     On 18/01/2019 11:04, davide.mosca8 via ZendTo wrote:
>>     Hi and first of all thanks for this amazing free and open source
>>     project.
>>
>>     I have a problem which I wrote about in the subject.
>>
>>     When trying to download a medium size (291MB) encrypted file in a
>>     dropoff I encounter a fatal error which breaks the rendering of
>>     the web page as usual.
>>     From php logs what I see is this:
>>
>>     *PHP Fatal error:  Uncaught SodiumException: ops limit must be
>>     greater than 0 in /opt/zendto/lib/NSSDropoff.php:612
>>     Stack trace:
>>     #0 /opt/zendto/lib/NSSDropoff.php(612): sodium_crypto_pwhash()
>>     #1 /opt/zendto/lib/NSSDropoff.php(944):
>>     NSSDropoff->downloadEncrypted()
>>     #2 /opt/zendto/www/download.php(109): NSSDropoff->downloadFile()
>>     #3 {main}
>>       thrown in /opt/zendto/lib/NSSDropoff.php on line 612*
>>     *
>>     *
>>     I have searched about this error and what I understood is that
>>     has to do with the number of operations needed to compute the
>>     encryption/decryption process.
>>
>>     I tried to change the encryption and checksums params (disabling
>>     checksum, make mandatory encryption, leverage the size of
>>     dropoffs to have encryption computed) in the config file but with
>>     no result.
>>
>>     when I try with small size dropoffs (max 25MB) the same procedure
>>     I don't encounter the problem.
>>
>>     What could it be?
>>
>>     Davide
>>
>>     _______________________________________________
>>     ZendTo mailing list
>>     ZendTo at zend.to  <mailto:ZendTo at zend.to>
>>     http://jul.es/mailman/listinfo/zendto
>
>     Jules
>
>     -- 
>     Julian Field MEng CEng CITP MBCS MIEEE MACM
>
>     'Think globally, act locally.' - Friends of the Earth
>
>     www.Zend.To  <http://www.Zend.To>
>     Twitter: @JulesFM
>
>     _______________________________________________
>     ZendTo mailing list
>     ZendTo at zend.to <mailto:ZendTo at zend.to>
>     http://jul.es/mailman/listinfo/zendto
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://jul.es/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM

'Gaze not into the abyss, lest you become recognised as an abyss
  domain expert, and they expect you to keep gazing into the damn thing.'
                                            - @nickm_tor

www.Zend.To
Twitter: @JulesFM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20190118/bdd805e4/attachment.html>


More information about the ZendTo mailing list