[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkscript() wrongly encodes non-ascii text #89

Open
e1fueg0 opened this issue Nov 9, 2019 · 3 comments
Open

checkscript() wrongly encodes non-ascii text #89

e1fueg0 opened this issue Nov 9, 2019 · 3 comments
Labels

Comments

@e1fueg0
Copy link
e1fueg0 commented Nov 9, 2019

When content takes more bytes than chars, the following command wrongly encodes text:

        content = tools.to_bytes(
            u"{%d+}%s%s" % (len(content), str(CRLF), content))

This code works correctly:

        content = tools.to_bytes(content)
        len1 = tools.to_bytes(u"{%d+}" % len(content))
        content = len1 + CRLF + content
@e1fueg0
Copy link
Author
e1fueg0 commented Nov 9, 2019

And also pls propagate out server message in case of error.

@e1fueg0
Copy link
Author
e1fueg0 commented Nov 10, 2019

Also pls expose the data from putscript().
And the code can be taken from putscript() to fix checkscript().

        content = tools.to_bytes(content)
        content = tools.to_bytes("{%d+}" % len(content)) + CRLF + content

@tonioo
Copy link
Owner
tonioo commented Jun 9, 2020

@e1fueg0 Sorry to react so lately but could you please make a PR with your modifications?

@tonioo tonioo added the bug label Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants