storj/satellite/metainfo
Ivan Fraixedes 7266155375 satellite/metainfo: List segments manually limit check
The endpoint listSegmentsManually method misses a check for the limit
parameter, otherwise it can return inconsistent results when it's 0 or
negative.

When 0 or negative, without the check, it returns no segments but also
that there isn't more segments and that isn't correct.

The function is only called from the Endpoint.ListSegments method and
the function cares to ensure that limit is always greater than 0, but if
the method doesn't check that a new future caller could misuse it and
provoke a bug.

Additionally:

* Documentation for the modified function has been written
* The part of the function that repeated the logic of the
  Endpoint.getPointer method has been removed for using that method.
* Added logging before returning an internal error in
  Endpoint.getPointer.

Change-Id: I5c4f0db2292da0162db6b7d63553895808d0925a
2019-12-31 07:44:46 +00:00
..
batch.go common: separate repository 2019-12-27 14:11:15 +02:00
config.go common: separate repository 2019-12-27 14:11:15 +02:00
db_test.go common: separate repository 2019-12-27 14:11:15 +02:00
db.go common: separate repository 2019-12-27 14:11:15 +02:00
endpoint_test.go common: separate repository 2019-12-27 14:11:15 +02:00
loop_test.go common: separate repository 2019-12-27 14:11:15 +02:00
loop.go common: separate repository 2019-12-27 14:11:15 +02:00
metainfo_test.go common: separate repository 2019-12-27 14:11:15 +02:00
metainfo.go satellite/metainfo: List segments manually limit check 2019-12-31 07:44:46 +00:00
service_test.go common: separate repository 2019-12-27 14:11:15 +02:00
service.go common: separate repository 2019-12-27 14:11:15 +02:00
validation.go common: separate repository 2019-12-27 14:11:15 +02:00