HomePhabricator

Merge #11809: gui: Fix proxy setting options dialog crash

Description

Merge #11809: gui: Fix proxy setting options dialog crash

Summary:
f05d349 gui: Fix proxy setting options dialog crash (Wladimir J. van der Laan)

Pull request description:

This fixes a crash bug when opening the options dialog.

- Check the return value of split() to avoid segmentation faults due to   out of bounds when the user manages to enter invalid proxy settings.  This is reported resonably often.

- Move the default proxy/port to a constant instead of hardcoding magic values.

- Factor out some common code.

- Revert #11448 because this proves a more robust replacement, it is no longer necessary and didn't generally solve the issue.

No attempt is made to do full sanity checking on the proxy, so it can still be rejected by the core with an InitError message.

Tree-SHA512: 72b700b7d6c4d3e3410f0c60e9e4facf93d7c6c1a1b6b23957c48b074a045970f518166952859d1ebca8620062cb70d222670a7310bbd6fe50550ec6d04417b5

Backport of Core PR 11809
https://github.com/bitcoin/bitcoin/pull/11809/files
Completes T548

Test Plan:
make check
test_runner.py
bitcoin-qt # visit Options -> Network tab and check that defaults are correct

Reviewers: deadalnix, Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Subscribers: teamcity, schancel

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Dec 7 2017, 16:40
jasonbcoxCommitted on Mar 12 2019, 16:35
jasonbcoxPushed on Mar 12 2019, 17:40
Reviewer
Restricted Project
Differential Revision
D2680: Merge #11809: gui: Fix proxy setting options dialog crash
Parents
rSTAGING48adf1fb0064: [wallet] Get rid of CWalletTx default constructor
Branches
Unknown
Tags
Unknown