I have random characters inserted in my files when PUT

Advertisement

dirluca
Joined:
Posts:
3
Location:
Udine - Italy

I have random characters inserted in my files when PUT

I've been using intensively WinSCP for some years now.
Since a couple of weeks (approssimatively from the update to version 5.7.7 I use now) I have a strange (and blocking!) problem.
Some of my files get uploaded with mysterious new lines with only one random character inserted here and there.

I use WinSCP GUI (Commander interface), FTP protocol, no scripting or automation of any sort. I update WinSCP regularly so I guess my last working version was 5.7.6, but I'm not sure. It could have been an update of the server causing the problem, as far as I know.

What I do know for sure is that if I upload the very same file in the very same place with Filezilla everything works allright. These are php files (so text files). The funny thing is if I open the file directly from remote (with internal WinSCP editor or with my usual text editor) I see the inserted character, I delete it, I save but nothing happens. If I open the file again the character is still there. The funnier thing is that sometimes (not always) making changes to the file (for example formatting it through my usual IDE) and uploading it again, the problem disappears.

I'm stuck, I don't know if it some option/protocol parameter/anything else I need to take care of, if it is a bug or what. I do know I cannot trust my FTP client anymore which is something not possible to cope with, and I know I would not like to drop WinSCP which served my so well.

Thanks for any help

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: I have random characters inserted in my files when PUT

Thanks for your report.

For a start, can you attach a session log file showing editing of the file?

Reply with quote

dirluca
Joined:
Posts:
3
Location:
Udine - Italy

Re: I have random characters inserted in my files when PUT

martin wrote:

Thanks for your report.

For a start, can you attach a session log file showing editing of the file?

Here you go.
Attached you can find the session log.
What I did:
    open session
    upload file
    open remote file with internal editor and copy content
    upload the same file with another FTP client
    open remote file with WinSCP internal editor and copy content
    look for differences

The result is the following: in a 428-rows file the only point where it was different is an added row (row 122) with a single "0" coming from I don't know where. Here is an excerpt with the ghost row:

    public function cbFileDaStringa($stringa) {
        $a = explode("+", $stringa);
        $x = new SimpleXMLElement('<?xml version="1.0" encoding="ISO-8859-1"?>' .
0
                        '<file tipoFile="' . $a[2] . '" size="' . $a[1] . '" md5="' . $a[0] . '">' .
                        ($a[2] == 'cartellaDati' ? $this->cartellaDati : $this->cartellaCommesse) . "/" . $a[3] .
                        '</file>');
        return new CloudBackupFile($x, $this->cartellaDati, $this->cartellaCommesse);
    }

Reply with quote

dirluca
Joined:
Posts:
3
Location:
Udine - Italy

Re: I have random characters inserted in my files when PUT

martin wrote:

A complete log file please.

Sorry, I was copying and pasting and didn't notice it was showing just last rows.
Attached you can find a complete log.

Reply with quote

Advertisement

You can post new topics in this forum