Giter Site home page Giter Site logo

pinentry-rs's Introduction

pinentry

pinentry is a library for interacting with the pinentry binaries available on various platforms.

Usage

Add this line to your Cargo.toml:

pinentry = "0.5"

See the documentation for examples.

pinentry requires Rust version 1.51 or greater.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

pinentry-rs's People

Contributors

str4d avatar woodruffw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pinentry-rs's Issues

Missing percent-escaping on the data line response

First of all, thanks for these bindings! They're a pleasure to use.

The Assuan protocol documents that certain characters must be percent-escaped, and that others may be:

Raw data returned to client. There must be exactly one space after the ’D’. The values for ’%’, CR and LF must be percent escaped; these are encoded as %25, %0D and %0A, respectively. Only uppercase letters should be used in the hexadecimal representation. Other characters may be percent escaped for easier debugging. All Data lines are considered one data stream up to the OK or ERR response. Status and Inquiry Responses may be mixed with the Data lines.

Experimentally, pinentry.rs fails to unescape these sequences, mangling the user's input if it happens to contain escaped characters. I took a quick glance at the code, and it looks like the escaping probably needs to happen here:

Response::DataLine(SecretString::new(data.to_owned()))

I'm happy to take a stab at fixing this.

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.