Documentation
¶
Index ¶
Constants ¶
const ( AllowBigBlockOptionName = "allow-big-block" SoftBlockLimit = 1024 * 1024 // https://github.com/ipfs/kubo/issues/7421#issuecomment-910833499 MaxPinNameBytes = 255 // Maximum number of bytes allowed for a pin name )
Variables ¶
var AllowBigBlockOption cmds.Option
Functions ¶
func CheckCIDSize ¶
func CheckCIDSize(req *cmds.Request, c cid.Cid, dagAPI coreiface.APIDagService) error
func CleanAndTrim ¶ added in v0.38.0
CleanAndTrim sanitizes untrusted strings from remote peers to prevent display issues across web UIs, terminals, and logs. It replaces control characters, format characters, and surrogates with U+FFFD (�), then enforces a maximum length of 128 runes.
This follows the libp2p identify specification and RFC 9839 guidance: replacing problematic code points is preferred over deletion as deletion is a known security risk.
func PathOrCidPath ¶ added in v0.24.0
PathOrCidPath returns a path.Path built from the argument. It keeps the old behaviour by building a path from a CID string.
func ValidatePinName ¶ added in v0.38.0
ValidatePinName validates that a pin name does not exceed the maximum allowed byte length. Returns an error if the name exceeds MaxPinNameBytes (255 bytes).
Types ¶
This section is empty.