Giter VIP home page Giter VIP logo

Comments (7)

pablo-s avatar pablo-s commented on August 30, 2024

Hi @spaetz ! Thank you for reporting the issue!

Yes, if fine with you, please send me the pkpass and I will fix it ([email protected])

from passes.

fogti avatar fogti commented on August 30, 2024

At least I can reproduce this problem using zint on the contents of the pkpass (extracted using jq).

from passes.

fogti avatar fogti commented on August 30, 2024

I took the aztec data from a ticket page and the .pkpass data package from the same page.

./ZXingReader -format Aztec -bytes ticket.png > ticket-decoded.raw
jq -r '.barcodes[0].message' < ticket.pkpass.extracted/pass.json > ticket-barcode.raw

both files have the same trailing 11 bytes (the last 8 bytes seem to be the VDV pubkey identifier). the byte before that differs (the version from the json file has an additional 0xc2 byte inserted there)

from passes.

fogti avatar fogti commented on August 30, 2024

maybe take a look at the unpack&validate stuff in https://github.com/KDE/kitinerary/blob/9473c03be6c650d1137d43b47a1220a452c8e7f5/src/lib/vdv/vdvticketparser.cpp

from passes.

fogti avatar fogti commented on August 30, 2024

ok, no it's worse actually (the above code already works on the properly decoded data, recognizable because the tag at the front matches what's expected)

decoded:      9e    81    80 07
vs.
from-json: c2 9e c2 81 c2 80 07

the whole "from-json" thing is interspersed with c2 and c3 values, although I don't know yet where they came from...

from passes.

fogti avatar fogti commented on August 30, 2024

I suppose jq -r '.barcodes[0].message' < pass.json | iconv -f 'UTF-8' -t 'LATIN1' (notice the conversion to LATIN1, as specified in the associated json)

% jq -r '.barcodes[0].messageEncoding' < pass.json 
iso-8859-1

Maybe I've spent way too many hours to debug this, but I guess this mostly solves this, conditional transcoding now "just" needs to be integrated into the barcode evaluation code.

from passes.

pablo-s avatar pablo-s commented on August 30, 2024

I have taken a look at this issue and I think I found the problem.

Passes is mostly written in Python, with the exception of the logic used to generate the barcodes (C language).

The problem seems to be in the way I am converting Python types into C types.

from passes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.