Giter Site home page Giter Site logo

MsgPack spec v5 support about msgpack-php HOT 11 CLOSED

msgpack avatar msgpack commented on July 19, 2024
MsgPack spec v5 support

from msgpack-php.

Comments (11)

docteurklein avatar docteurklein commented on July 19, 2024

i'd very much like to see v5 supported as well.

from msgpack-php.

xiaoxiangdu avatar xiaoxiangdu commented on July 19, 2024

I want V5 too, Any body can give a plan?

from msgpack-php.

mattheworiordan avatar mattheworiordan commented on July 19, 2024

@dawnlucky and @docteurklein I've been waiting a good old while, looks like we might need to implement ourselves.

from msgpack-php.

xiaoxiangdu avatar xiaoxiangdu commented on July 19, 2024

Hey guys, I asked @laruence from weibo, he said he will implement this feature one or two months later after release of PHP7 RC.

from msgpack-php.

laruence avatar laruence commented on July 19, 2024

yeah, I am kind of busy recently.. sorry for that, and if anyone could implement this, it will be appreciated..

from msgpack-php.

Sean-Der avatar Sean-Der commented on July 19, 2024

Hey everyone, I am working on PHPNG support in PR #48

I would love to get v5 support into that branch! I will not be working on until I get all the tests passing in that branch (2 weeks I am thinking! Depending on my work schedule)

If someone wants to make some basic test cases, I would really appreciate it! This also makes sure than when I say 'it is done!' the thing you want to serialize/deserialize just works.

from msgpack-php.

Sean-Der avatar Sean-Der commented on July 19, 2024

Hey @mattheworiordan

Deserialization support for the bin format family has been added and str8 serialization/deserialization is supported now.

The only thing left I think is the 'compatibility mode' that would disable str8 and #49 has already been filed to address that.

from msgpack-php.

mattheworiordan avatar mattheworiordan commented on July 19, 2024

@Sean-Der nice work! Once #49 is resolved, then we will implement in our client libraries, see ably/ably-php#14. Thanks again.

from msgpack-php.

laruence avatar laruence commented on July 19, 2024

@Sean-Der, actually I am thinking a problem of security.. we have no way to detect an input is legal. that means, for string unserialize we do "ZVAL_STRING(zv, (char*)bin, size);" , so if an attacker give us a huge size, we may result in segfault(invalid read at least)..

maybe we should add some protection, like the size of a str/bin can not be greater than the whole serialized string length...

What do you think?

from msgpack-php.

Sean-Der avatar Sean-Der commented on July 19, 2024

@laruence I think that is a excellent idea! I did some snooping in the Python implementation and found this want me to open a PR that adds default limits for bin/str/array/map default limits that can also be set by the user?

from msgpack-php.

laruence avatar laruence commented on July 19, 2024

hmm, add a limit is not the best solution... for bin/raw, if we found the len is greater than the rest serilazlied string, then -> error.

from msgpack-php.

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.