php_phongo_bson_visit_document() should check class interface before unserializing

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 0.4.0
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As first mentioned in PHPC-209:

      When php_phongo_bson_visit_document() and php_phongo_bson_visit_array() iterate on the keys within objects and arrays, respectively, the class name picked up by php_phongo_bson_visit_binary() is used for hydration and the unserialize method (i.e. BSON_UNSERIALIZE_FUNC_NAME) is invoked directly. From what I can tell, this code doesn't appear to check if the class itself implements the required interface.

            Assignee:
            Hannes Magnusson (Inactive)
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: