Forgot your password?
typodupeerror

Comment: Re:CSS variables? (Score 1) 256

by Richard_J_N (#46540203) Attached to: Firefox 29 Beta Arrives With UI Overhaul And CSS3 Variables

Personally, I found that dynamically generating my CSS from PHP is the solution. It's easy to understand, easy to write, cross platform, and (using the etag trick), has good performance and bandwidth use.

So I have a bunch of rules like this:
echo "body{ height:100%; background: $colour_body_bg; font-family: $fontface_body; color: $colour_body_text}\n";
Even better, I can support slightly different versions of the stylesheet by linking to "style.php?style=theme_name".

Then, to handle performance and bandwidth, I use etags. The browser will always cache this document at least 10 minutes. After that, it will check for a newer version, but the server will usually reply with 304 (unchanged).
$last_modified_time = filemtime(__FILE__);
$etag = md5_file(__FILE__);
header("Last-Modified: ".gmdate("D, d M Y H:i:s", $last_modified_time)." GMT");
header("Etag: $etag");
if (@strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified_time ||
        trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) {
        header("HTTP/1.1 304 Not Modified");
        exit;
}
header("Cache-Control: max-age=600");
header("Content-type: text/css");

Comment: Re:Why is this legal? (Score 1) 572

That would be ideal, but it requires elevated privileges (no idea why that should be). So I'd have to put it in a firefox extension.

I'm trying to protect normal users who may not be aware that their employer is MITMing them by providing them with a web browser which has been misconfigured into trusting the cert of an SSL proxy appliance.

Comment: Re:Why is this legal? (Score 1) 572

How does DNSSEC help?

I'd like (ideally) to write a php script that would detect when my users are on "compromised" machines, and warn them.
What I want is to write some javascript that would send back to the server what the client *thinks* is my certificate fingerprint.

Comment: Re:Hidden problems with proxies (Score 1) 177

by Richard_J_N (#46322905) Attached to: Most Alarming: IETF Draft Proposes "Trusted Proxy" In HTTP/2.0

Why? If the connection is being MITMd, then both sides need to be able to figure this out.
There was a long discussion on this (regrettably rejected by the browser vendor) to allow the SSL fingerprint to be obtained in JS. That would make it reasonably easy for the site operator to verify that the SSL cert hadn't been tampered with. (Of course, a really evil proxy can scan for the JS, but that game of whack-a-mole is usually easier for the good guys to win, at least sometimes).

Comment: Re:Hidden problems with proxies (Score 1) 177

by Richard_J_N (#46318735) Attached to: Most Alarming: IETF Draft Proposes "Trusted Proxy" In HTTP/2.0

As a website operator, I want to know if my content is being MITMd en route to the user. I know about the SSL fingerprint trick that lets a really technical user discover proxying, but I want to automate this process server-side, and stick up a big banner to say "Your employer is snooping on this connection, please log in from a trusted machine" (and then I'll prevent the user from logging in).

Comment: Merge window buttons and menu bar? (Score 3, Interesting) 255

by Richard_J_N (#46301279) Attached to: Ubuntu 14.04 Brings Back Menus In Application Windows

I've never understood why we can't get the window-manager and the application to play nice, and share one bar. Usually, there's plenty of space horizontally, and too little vertically. So, why not have the combination of:
[icon] File Edit View History Bookmarks Tools Help ....... "The window title goes here" ....... _ [] X

Comment: Just require decent service from the police. (Score 1) 341

by Richard_J_N (#46192541) Attached to: California Bill Proposes Mandatory Kill-Switch On Phones and Tablets

I've found twice now that, on reporting stolen devices (to the UK police), even if we know exactly where they are (trackers, phone home etc), there's no way to get the police to react (promptly) to go and get it back. If the police would quickly go and retrieve stolen devices, the problem would vanish.

Comment: Key distribution and metadata? (Score 1) 118

by Richard_J_N (#45647011) Attached to: CyanogenMod Integrates Text Message Encryption

I looked at this, and there are 2 things I can't understand:

1. How does key distribution work? Even public-key crypto of this type doesn't necessarily work if there is a man in the middle.
2. How is metadata protected? For an SMS, often the timestamp and sender/recipient pairing is as revealing as the message content.

Comment: iPad sync? (Score 1) 317

by Richard_J_N (#45624617) Attached to: Ask Slashdot: Best FLOSS iTunes Replacement In 2013?

For Linux users, is there any way to replace the iTunes functionality to get music and photos onto an iDevice, and have it properly recognise the library?
I only use Linux, but have an iPad3. I have mediocre photo functionality[1] via a jailbreak, but am still stuck with only one folder and no sub-folders. As for getting music on there (especially .ogg), forget it.
[1] http://www.richardneill.org/stotbig#ipad

Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

Working...