Add check that input source is an uncompressed text file.#56
Add check that input source is an uncompressed text file.#56flexibeast wants to merge 1 commit intozlin:masterfrom
Conversation
|
The check |
|
Sure. So should it be |
I don't think it would, but you would still have the false negative scenario to deal with. Consider the example: The file command only checks the first 1 million bytes, so if the first non-Unicode character doesn't appear within the first one million bytes, file will report that the file is a text file. All this said, the root issue isn't whether the file is compressed or not, but whether it contains NULL bytes (0x00). If it does, then the upload is corrupted as those bytes are stripped out. Otherwise, the upload is probably safe. Put simply, wgetpaste needs to find some way to escape NULL bytes when returning from the |
Would it be enough to pipe the output of each branch of the ? |
|
maybe. I'd have to test it to be sure. |
Independent of #55; if this is merged first, i'll rebase and update that PR accordingly.
At the moment,
wgetpasteseems to only handle uncompressed text files, so check for this and note it in the--helptext.