HomePhabricator

Prevent downloading the payment request if it's larger than the max allowed

Description

Prevent downloading the payment request if it's larger than the max allowed

Summary: When a URI contains a r=<url> field, the payment request is downloaded from this url then the size is checked against a limit (currently 50kB). This diff improves this behavior so that the node will not bother downloading the whole request if it detects it's oversized.

Test Plan:
Use "File->Open URI" to load a URI containing r=<url> where the url contains a file > 50kB. Check the download is aborted quickly and the node reports a useful error message. Repeat the process several times.

ninja check-bitcoin-qt

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16418

Details

Provenance
FabienAuthored on Jul 3 2024, 21:29
FabienPushed on Jul 4 2024, 07:17
Reviewer
Restricted Project
Differential Revision
D16418: Prevent downloading the payment request if it's larger than the max allowed
Parents
rABCcd50851eb621: [electrum] add a timeout and max data size when downloading a payment request
Branches
Unknown
Tags
Unknown