Giter VIP home page Giter VIP logo

Comments (5)

zandbelt avatar zandbelt commented on August 15, 2024

I agree: time to change to jansson; stay tuned.

from mod_auth_openidc.

zandbelt avatar zandbelt commented on August 15, 2024

here we go: please check 2a187ee

from mod_auth_openidc.

martinsrom avatar martinsrom commented on August 15, 2024

Thank you for the quick change to jansson.
But the code is still not completely correct, because integers in JSON are rendered as %ld into claims instead of their values.

I suspect that apr_psprintf method is not properly handling the %lld format (into which the JSON_INTEGER_FORMAT is expanded).

I tried to change the

apr_psprintf(r->pool, "%" JSON_INTEGER_FORMAT "", json_integer_value(j_value)),

to

apr_psprintf(r->pool, "%ld", json_integer_value(j_value)),

and it fixes the problem (but it produces a compilation warning).

May be the final solution would be to explicitly cast the result from json_integer_value to long int:

    apr_psprintf(r->pool, "%ld", (long int) json_integer_value(j_value)),

from mod_auth_openidc.

zandbelt avatar zandbelt commented on August 15, 2024

apparently Mac OS X did not suffer from this; fixed by using plain sprintf in 2745e10

from mod_auth_openidc.

martinsrom avatar martinsrom commented on August 15, 2024

The JSON processing now seems correct, thank you for fixes.

from mod_auth_openidc.

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.