Skip to content

Problems with identity in cpost configs #217

Description

@reidsunderland

While trying to migrate some v2 cpost configs to sr3 cpost, I came across some problems.

First problem:

The identity option isn't parsed correctly:

config option parsed as sum= result
sum d md5 on data d
sum n md5 on file name n
sum s sha512 on data s
identity md5name m ❌ should be n md5 on file name
identity md5 m ❌ should be d md5 on file data
identity sha512 s

Second problem:

When using sum n (md5name) with v03 format messages, identity is missing from the message:

{ "pubTime" : "20260129T174716.2993753", "baseUrl" : "sftp://localhost/", "relPath" : "tmp/test", "source" : "bunnymaster", "size" : "5", "atime" : "20260129T161256.87121107", "mtime" : "20260129T161246.786308", "mode" : "644" }

compared to v02 format messages:

Image

Maybe this was intentional, because identity is optional in v03 messages and md5 on the file name is kind of useless? But the behaviour is inconsistent with the Python version and surprising/confusing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdifferent_from_pythona case where the C implementation does not behave the same as the python reference implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions