Posts Tagged ‘Bluefish’

Quick Security Alert Regarding Bluefish Editor

Sunday, July 12th, 2009

This will be a quick post because I've been slammed with work lately, but I just wanted to mention something alarming that I discovered the other day. As I started using Bluefish Editor, I started noticing all sorts of extra files on my server with a ~ at the end of the filename (index.php~ as an example). So, I tried typing one of those into my browser and, to my alarm, found that my server was displaying the raw PHP code! Of course, this is a huge security risk. So, here's how I fixed it:

  1. I disabled the auto-backup feature in the editor. In Bluefish, this was just an option in the preferences menu. Note: I have no idea why they would have this as a default setting. It makes no sense to me. Anyway...
  2. I deleted all of those extra files I could find.
  3. I modified the .htaccess file to prevent any of them that I missed in the cleanup from being displayed. By adding this code to your highest level .htaccess, you'll now get a forbidden 403 when attempting to access:
    <Files ~ "~$">
      Order allow,deny
      Deny from all
    </Files>

Hope that helps someone out there.

What text editor is best for coding?

Thursday, June 25th, 2009

This is a question that I haven't thought much about in the last ten years or so.  I picked up a copy of Homesite back when it was still published by Allaire and never looked back.  I upgraded versions a couple times out of necessity as I moved to new computers, but never really checked out any other editors.  So, why change now?  Well...

After Vista forced me to install some update or another, my built in FTP client stopped working.  Even so, I stuck with Homesite.  It was like an old, favorite, worn-in baseball glove by this point and I didn't want to give it up.  But then, my hard drive started making this crazy noise consistently and Vista kept giving me bizarre errors and I realized my laptop was probably on it's last legs.  Rather than panic after a crash, I decided to be proactive and get a new computer (a desktop) and I loaded it up with Ubuntu Linux distribution rather than continuing to deal with the Microsoft garbage.

Homesite doesn't work with Linux so I was forced to finally find something new.  Bluefish Editor is what I came up with. It rocks. I easily connected it to all my FTP hosts (including the SFTP ones) and happily started coding away.

Only problem was that I kept forgetting what I had edited from there and then overwriting my own code with local stuff from the laptop. Plus, my wrist was taking some major abuse with all those clicks: save, switch window to FTP, change local directory, change remote directory, upload, change window to browser, refresh, switch back to the editor, etc. Finally, I decided enough was enough and I went out on the hunt for a new editor for my laptop.

The first thing I tried was just getting familiar with the VI Editor and working directly on the servers through a shell. Although this would have been wicked cool, it is a pretty steep learning curve and I just didn't have the patience. Every time I wanted to do anything (cut, paste, search, replace, undo) I'd have to go back to the tutorial. That got annoying real quick. Plus, I found that the VI Editors on different servers are wildly different. One will be color coded while another is monochromatic, etc.

So, then I asked a colleague for recommendations and he said to try PSPad and Notepad++. But after downloading these, I quickly found that neither supported SFTP so they were no good for me. I was hoping to find something like Bluefish for Windows, but there was just nothing out there.

Finally, I downloaded a copy of WinSCP and figured out how to configure it to work with Homesite as an external editor. I guess I should have just done that to begin with and saved myself all this effort. Bottom line is, 10 years later, I continue to use the same editor I started with. Funny how some things never change.


Copyright © 2010, Ink Plant. All rights reserved.