mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
Merge remote-tracking branch 'remediate/master' into LFS-01-008
This commit is contained in:
commit
82e4704415
1
newsfragments/3819.security
Normal file
1
newsfragments/3819.security
Normal file
@ -0,0 +1 @@
|
||||
The introducer server no longer writes the sensitive introducer fURL value to its log at startup time. Instead it writes the well-known path of the file from which this value can be read.
|
@ -136,7 +136,7 @@ class _IntroducerNode(node.Node):
|
||||
os.rename(old_public_fn, private_fn)
|
||||
furl = self.tub.registerReference(introducerservice,
|
||||
furlFile=private_fn)
|
||||
self.log(" introducer is at %s" % furl, umid="qF2L9A")
|
||||
self.log(" introducer can be found in {!r}".format(private_fn), umid="qF2L9A")
|
||||
self.introducer_url = furl # for tests
|
||||
|
||||
def init_web(self, webport):
|
||||
|
@ -106,7 +106,29 @@ class ShareFile(object):
|
||||
sharetype = "immutable"
|
||||
|
||||
def __init__(self, filename, max_size=None, create=False, lease_count_format="L"):
|
||||
""" If max_size is not None then I won't allow more than max_size to be written to me. If create=True and max_size must not be None. """
|
||||
"""
|
||||
Initialize a ``ShareFile``.
|
||||
|
||||
:param Optional[int] max_size: If given, the maximum number of bytes
|
||||
that this ``ShareFile`` will accept to be stored.
|
||||
|
||||
:param bool create: If ``True``, create the file (and fail if it
|
||||
exists already). ``max_size`` must not be ``None`` in this case.
|
||||
If ``False``, open an existing file for reading.
|
||||
|
||||
:param str lease_count_format: A format character to use to encode and
|
||||
decode the number of leases in the share file. There are only 4
|
||||
bytes available in the file so the format must be 4 bytes or
|
||||
smaller. If different formats are used at different times with
|
||||
the same share file, the result will likely be nonsense.
|
||||
|
||||
This parameter is intended for the test suite to use to be able to
|
||||
exercise values near the maximum encodeable value without having
|
||||
to create billions of leases.
|
||||
|
||||
:raise ValueError: If the encoding of ``lease_count_format`` is too
|
||||
large or if it is not a single format character.
|
||||
"""
|
||||
precondition((max_size is not None) or (not create), max_size, create)
|
||||
|
||||
self._lease_count_format = _fix_lease_count_format(lease_count_format)
|
||||
|
@ -493,7 +493,7 @@ class DownloadTest(_Base, unittest.TestCase):
|
||||
d.addCallback(_done)
|
||||
return d
|
||||
|
||||
def test_simultaneous_onefails_onecancelled(self):
|
||||
def test_simul_1fail_1cancel(self):
|
||||
# This exercises an mplayer behavior in ticket #1154. I believe that
|
||||
# mplayer made two simultaneous webapi GET requests: first one for an
|
||||
# index region at the end of the (mp3/video) file, then one for the
|
||||
|
Loading…
Reference in New Issue
Block a user