Skip to content

Commit a1a1219

Browse files
committed
Allow only http or https URLs for RawProxy
1 parent e97fd37 commit a1a1219

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bitcoin/rpc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ def __init__(self, service_url=None,
109109

110110
self.__service_url = service_url
111111
self.__url = urlparse.urlparse(service_url)
112+
113+
if self.__url.scheme not in ('https', 'http'):
114+
raise ValueError('Unsupported URL scheme %r' % self.__url.scheme)
115+
112116
if self.__url.port is None:
113117
if self.__url.scheme == 'https':
114118
port = httplib.HTTPS_PORT

0 commit comments

Comments
 (0)