Skip to content

Passwords stored in config file are not loaded correctly into the client #29

@paul121

Description

@paul121

This was brought up by farmOS/field-kit#295

When using a password such as J6Q-xAd+d:K[b>Bo>\Nn%Q-kB)Y+hdxS special consideration must be used. Normally this string would encode the escape character \N when written with double quotes: "J6Q-xAd+d:K[b>Bo>\Nn%Q-kB)Y+hdxS" Python will use the escape character or throw an error if it is invalid. To fix this, the string must be passed as r"J6Q-xAd+d:K[b>Bo>\Nn%Q-kB)Y+hdxS" - this passes it as a raw string that Python will respect.

It is the responsibility of the user to pass a raw string containing their password to the farmOS.py client - this should be taken into consideration for libraries that utilize the farmOS.py client

That said, there is a bug: When passwords are saved in the config file, they must be retrieved as a raw string. Currently this is not done and will throw an error for complex passwords.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions