kdmurray.blog

The crossroads of life and tech

Turn off URL Trimming in Firefox

With the latest release of Firefox, Mozilla has decided that we don’t need to see the “http://” at the beginning of a URL. While this may be true for day-to-day browsing, it makes copying and pasting URLs a bloody nightmare.

Most applications detect a URL based on it starting with some sort of protocol directive (http://, https://, ftp://, mailto:). By removing that directive from the beginning of the URL Mozilla now forces us to type them in as we go, reducing productivity and generally being a pain in the behind.

For the record, this portion of the URL is still visible for https:// URLs to help everyone know that pages are encrypted using SSL/TLS. This somehow makes it even worse in my eyes, since this non-security related behaviour is different based on whether or not the application is encrypted.

You can, however, correct this abhorrent behaviour with a trip to the Firefox about:config page.

DISCLAIMER: Read the disclaimer on the about:config page.

1. Go to the about:config page in Firefox

2. In the filter box, type in: browser.urlbar.trimURLs

3. Double-click on the value to change from true to false

After making the change, that line will show up in bold to indicate that it has been changed from the default setting. This is helpful if you want to restore settings to their default at some point in the future — though in this case I can’t imagine why.

Happy linking!

Leaking Tokens: Time to Change Your Facebook Password

I don’t do this kind of thing lightly, but it might be a good idea to post this on your wall:

  • Facebook found a problem in the way that it was authenticating applications.
  • Any time you used an application a token was created that would allow the application to do it’s thing — including posting on your wall, accessing photos or whatever other permissions it requested.
  • The tokens did not expire and were being “leaked” through normal operation on Facebook.
  • Anyone who found a token would be able to use it to do the same things that you allowed the application to do — including posting on your wall, accessing photos or whatever other permissions it requested.

It is important to note that Facebook has said there is no evidence that this has been exploited — yet.

The problem has now been fixed, but all the old tokens could still be usable until September 2011. You can re-secure your account by simply changing your Facebook password. This will invalidate any of the existing tokens.

Information Week has an article with more detail.

Redirecting Your Website (URL Redirection)

It’s late, and I’m tired, so this is gonna be a short post.  I got a question from @Mattoid12 on twitter tonight about how to redirect a website.  I’m going to show three ways, and then provide a link to a site which shows every conceivable way of redirecting a website.

.htaccess File

If you have access to edit your .htaccess file (FTP or SSH access to your server) put this line at the top.  It will redirect the local url “/” (root) to the new location.  More on HTTP 301 here.  I’ve discussed this in more detail on a previous post.

Redirect 301 / http://yournewwebsite.net/

HTML Meta Tag

The example below will redirect a page to the new location after two seconds.  This code should be placed at the top of your index or default page.

<meta http-equiv="refresh" content="2;url=http://yournewwebsite.net">

PHP Redirect

This method is sort of a combination of the above two approaches.  It will perform an instant redirect and return HTTP 301 to the browser.  This code needs to be entered in your index.php file.

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://yournewwebsite.net" );
?>

For examples of a large number of other possible redirects are available on webconfs.com.