containers / storage

Container Storage Library
Apache License 2.0
539 stars 234 forks source link

chunked: fix escape of space #1895

Closed giuseppe closed 2 months ago

giuseppe commented 2 months ago

the code was copied from the composefs C version:

if (noescape_space)
    hex_escape = !isprint(c);
else
    hex_escape = !isgraph(c);

but unicode.IsGraphic() seems to behave differently and includes the space:

isgraph(' ') -> 0 unicode.IsGraphic(' ') -> true

giuseppe commented 2 months ago

@rhatdan this is the fix for the mkcomposefs: Invalid integer 628 error we have seen

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, kolyshkin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/storage/blob/main/OWNERS)~~ [giuseppe] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
kolyshkin commented 2 months ago

/ljtm

rhatdan commented 2 months ago

/lgtm