Code Monkey home page Code Monkey logo

Comments (3)

jbardin avatar jbardin commented on July 3, 2024

sh_quote should only be used in get. When using put the filename doesn't go through a shell and doesn't need the same escaping. \n will still need to be escaped however, since the protocol is line terminated.

from scp.py.

chubinou avatar chubinou commented on July 3, 2024

Hi, i've fixed it like this chubinou@cf5d3dc by escaping characters rather than quoting them. I didn't do the \n things as it was to my mind a workaround of the protocol.

I'll test your pacth ASAP.

from scp.py.

jbardin avatar jbardin commented on July 3, 2024

Thanks,
I'm pretty sure I found a corner-case that doesn't work with using re.escape, and is why I backported the sh_quote function ... I wish I made a note of why 😞

The newline escaping is a workaround of the protocol, but since it's not a very good protocol, I just try to follow openssh.

from scp.py.

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.