Skip to content

SecureStringDeserializer incorrect use of getText() method #3

@jaroslawZawila

Description

@jaroslawZawila

I believe there is implicit assumption that JsonParser passed to deserialize method is set to current token of VALUE_STRING.
That means that when .getText() method is invoked returns the full string representation of SecureString.

Unfortunately, in some cases when the current token is not of type VALUE_STRING the result is not as expected.
If the current token is set to START_OBJECT then .getText() returns { and that is used to create SecureString.

I think the deserialisation should fail if if the current token is not VALUE_STRING and is not based64 encoded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions