Categories
Internet

Dealing with website forms that disable pasting

Occasionally I run across a website that thinks its a good idea to arbitrarily restrict fundamental functions of my browser. Recently I signed a petition (about poorly conceived internet regulation) which asked for my email address twice. Obviously I'm not going to type it twice, I'm going to type it once, copy it, then paste it into the second box. Except nothing happens. Have I hit the wrong key? Try again. Nope still doesn't work. Frustration mounts.

I took a look at the code to see how they did it by right-clicking in the offending text box and selecting "inspect element". some bright spark used on_paste="return false"
It's easy to see that they have implemented this anti-feature with the piece of code that says:
onpaste="return false"

One of the great features about the Chrome/Chromium browser is that you can directly edit the page via Inspect Element and instantly see the results. So after double-clicking on the onpaste element, and deleting it - I was able to paste my email address into the form!

Categories
Internet Linux

BT Infinity and OpenWRT

So my girlfriend can't get reliable wifi upstairs on her iphone, maybe the bed's metal frame is acting as a faraday cage, maybe the BT HomeHub 3 router is not very good.

Regardless of who's to blame for the wifi issues, the HomeHub's interface doesn't let you change DNS servers - ostensibly for security reasons but as likely to be related to BT's commercial decision to redirect failed DNS queries to advertising web pages. This is hugely frustrating when you are trying to find out if a host is up by pinging it, and the ping succeeds while the host is down, because you mistyped the hostname and were redirected to BT's "spoof" response.

Anoyingly, if the broadband connection goes down, the router starts redirecting all web requests to itself at the address bthomehub.home which causes certificate errors in applications like thunderbird - generally a pain in the arse.

So its clearly time to ditch the HomeHub 3 and get a proper router. Given the ddwrt GPL violations, OpenWRT is the obvious choice of OS.

Although OpenWRT can be put on a HomeHub 3, the current procedure involves a soldering iron. Therefore I bought myself a TP-Link WR1043ND which is supported by OpenWRT and has a gigabit switch - not bad for £50. Upgrading the firmware was a doddle, simply a matter of downloading the latest firmware for my device (http://downloads.openwrt.org/backfire/10.03.1/ar71xx/openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin at time of writing) and using the router's built in firmware upgrade page! Very smooth.

Its all fairly straightforward to configure via the web interface (and in fact it comes with a pretty much decent configuration out of the box). I connected the bt infinity modem via the WAN port, and set up the PPPoE connection using the password from my homehub 3 router (bthomehub@btbroadband.com). There is no password listed in the homehub 3 configuration pages but it turns out I had to set up a password of "BT" before the connection succeeded. This was the only non-obvious thing I had to do to get everything working.