Home Download Buy Blog Forum Support

Warning! SublimeText + sFTP

Re: Warning! SublimeText + sFTP

Postby sme on Tue Dec 17, 2013 4:15 am

The sftp-config.json is ignored unless the user explicitly opens the file, or right-clicks on it and uploads it.


This is an untruth.

Try it out for yourselves:
    Use ST2 or ST3
    edit your sftp-config.json file by simply changing anything inside it
    save it as you would any other local file in STx
    connect to and browse your server
    look in the document root and see what you find

No other FTP programs on the client machine are in use.
sme
 
Posts: 8
Joined: Tue Dec 17, 2013 3:17 am

Re: Warning! SublimeText + sFTP

Postby sme on Tue Dec 17, 2013 4:21 am

Stop using the SFTP package until the next version comes out


Unfortunately, this option is not the best given STx and SFTP plug-in are the only IDE and FTP running on my machine.

Any ETA on the "next version"?
sme
 
Posts: 8
Joined: Tue Dec 17, 2013 3:17 am

Re: Warning! SublimeText + sFTP

Postby wbond on Tue Dec 17, 2013 3:01 pm

sme wrote:
The sftp-config.json is ignored unless the user explicitly opens the file, or right-clicks on it and uploads it.


This is an untruth.

Try it out for yourselves:
    Use ST2 or ST3
    edit your sftp-config.json file by simply changing anything inside it
    save it as you would any other local file in STx
    connect to and browse your server
    look in the document root and see what you find

No other FTP programs on the client machine are in use.


Can you paste your configuration (sans host, username, password)? If there is a bug, I will certainly fix it immediately.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Warning! SublimeText + sFTP

Postby sme on Tue Dec 17, 2013 9:36 pm

Code: Select all
{
    // The tab key will cycle through the settings when first created
    // Visit http://wbond.net/sublime_packages/sftp/settings for help
   
    // sftp, ftp or ftps
    "type": "sftp",

    "upload_on_save": true,
    "sync_down_on_open": true,
    "sync_skip_deletes": true,
    "sync_same_age": false,
    "confirm_downloads": true,
   
    "host": "ftp.mydomain.com",
    "user": "user",
    "password": "pAsSwOrD9",
    "port": "22",
   
    "remote_path": "/{document root}/",
}


The moment you edit and change anything inside this sftp-config.json file it gets uploaded to the document root of the server.
sme
 
Posts: 8
Joined: Tue Dec 17, 2013 3:17 am

Re: Warning! SublimeText + sFTP

Postby wbond on Wed Dec 18, 2013 12:09 am

sme wrote:
Code: Select all
{
    // The tab key will cycle through the settings when first created
    // Visit http://wbond.net/sublime_packages/sftp/settings for help
   
    // sftp, ftp or ftps
    "type": "sftp",

    "upload_on_save": true,
    "sync_down_on_open": true,
    "sync_skip_deletes": true,
    "sync_same_age": false,
    "confirm_downloads": true,
   
    "host": "ftp.mydomain.com",
    "user": "user",
    "password": "pAsSwOrD9",
    "port": "22",
   
    "remote_path": "/{document root}/",
}


The moment you edit and change anything inside this sftp-config.json file it gets uploaded to the document root of the server.



You deleted the ignore_regexes setting (http://wbond.net/sublime_packages/sftp/ ... re_regexes), which has the useful value of making sure you don't upload your config. If you put it back, you'll be all set!
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Warning! SublimeText + sFTP

Postby sme on Wed Dec 18, 2013 12:16 am

Thanks. My impression was that whatever I put here overrode the default in the sftp-config.json template.

So I need to use the entire template here and not just the portions I want changed?
sme
 
Posts: 8
Joined: Tue Dec 17, 2013 3:17 am

Re: Warning! SublimeText + sFTP

Postby wbond on Wed Dec 18, 2013 2:14 am

sme wrote:Thanks. My impression was that whatever I put here overrode the default in the sftp-config.json template.

So I need to use the entire template here and not just the portions I want changed?


The way it is currently implemented, that is correct. I'd be happy to add an enhancement to treat the sftp-config.json as an overlay for the next feature release.
wbond
 
Posts: 528
Joined: Mon Feb 28, 2011 5:33 am

Re: Warning! SublimeText + sFTP

Postby iamntz on Wed Dec 18, 2013 5:41 am

@Wbond: i guess you could add a triple confirmation when you try to upload sftp config file, no matter what are the settings.
Something like:
Are you sure?
Are you absolutely sure?
Please be sure you wanna do this!

Only after the user response to all of these, you upload the file.

Also, on file save (or sync?) do a quick search (at least in the project root) for sftp config files and show a warning if one is found.
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Warning! SublimeText + sFTP

Postby excalibur1976 on Wed Dec 18, 2013 10:21 am

Sorry, but why you need a triple confirmation?

For me and also other developers in our company the current functionality of WBonds SFTP-Plugin works for us in a great way.
We never got in trouble because we didn't touch the ignore_regexes in case of the sftp-config. Why should we...

In my opinion, it is just a "user" malfunction instead of sftp itself.
excalibur1976
 
Posts: 24
Joined: Wed Dec 12, 2012 10:27 pm
Location: Germany

Re: Warning! SublimeText + sFTP

Postby iamntz on Wed Dec 18, 2013 10:44 am

Sorry, but why you need a triple confirmation?

Just to avoid
In my opinion, it is just a "user" malfunction instead of sftp itself.
iamntz
 
Posts: 917
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests