Changeset 493ed46a2b8f…
Parent df4aeaf61143…
by
Changes to 2 files · Browse files at 493ed46a2b8f Showing diff from parent df4aeaf61143 Diff from another changeset...
@@ -11,6 +11,9 @@ * Avoid calling free_objects() on NULL in error cases. (Chris Eberle)
* Fix use --bare argument to 'dulwich init'. (Chris Eberle)
+
+ * Properly abort connections when the determine_wants function
+ raises an exception. (Jelmer Vernooij, #856769)
FEATURES
|
@@ -419,7 +419,11 @@ negotiated_capabilities = list(self._send_capabilities)
if 'report-status' not in server_capabilities:
negotiated_capabilities.remove('report-status')
- new_refs = determine_wants(old_refs)
+ try:
+ new_refs = determine_wants(old_refs)
+ except:
+ proto.write_pkt_line(None)
+ raise
if new_refs is None:
proto.write_pkt_line(None)
return old_refs
@@ -446,7 +450,11 @@ proto, can_read = self._connect('upload-pack', path)
(refs, server_capabilities) = self._read_refs(proto)
negotiated_capabilities = list(self._fetch_capabilities)
- wants = determine_wants(refs)
+ try:
+ wants = determine_wants(refs)
+ except:
+ proto.write_pkt_line(None)
+ raise
if not wants:
proto.write_pkt_line(None)
return refs
|
Loading...