Skip to content
Snippets Groups Projects
Commit 2f9b4364 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

black and isort

parent 4fb2546a
No related branches found
No related tags found
1 merge request!272Defend against the length-contraction slot_testv_and_readv_and_writev DoS
......@@ -24,14 +24,14 @@ from time import time
from allmydata.storage.mutable import MutableShareFile
from challenge_bypass_ristretto import random_signing_key
from foolscap.referenceable import LocalReferenceable
from hypothesis import given, note, assume
from hypothesis import assume, given, note
from hypothesis.strategies import integers, just, lists, one_of, tuples
from testtools import TestCase
from testtools.matchers import AfterPreprocessing, Equals, MatchesAll
from twisted.internet.task import Clock
from twisted.python.runtime import platform
from .._storage_server import _ValidationResult, NewLengthRejected
from .._storage_server import NewLengthRejected, _ValidationResult
from ..api import MorePassesRequired, ZKAPAuthorizerStorageServer
from ..storage_common import (
add_lease_message,
......@@ -440,7 +440,12 @@ class PassValidationTests(TestCase):
new_length=integers(),
)
def test_mutable_new_length_rejected(
self, storage_index, secrets, sharenums, test_and_write_vectors_for_shares, new_length,
self,
storage_index,
secrets,
sharenums,
test_and_write_vectors_for_shares,
new_length,
):
"""
If ``new_length`` is not ``None`` then ``slot_testv_and_readv_and_writev``
......@@ -483,7 +488,6 @@ class PassValidationTests(TestCase):
else:
self.fail("expected a failure but got {!r}".format(result))
@given(
storage_index=storage_indexes(),
secrets=tuples(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment