nin page 6 - Dave's Blog

Search
My timeline on Mastodon

WHATWG Weekly: http+aes URL scheme, control Referer, …

2012 Mar 7, 8:08

Seems generally bad to embed sensitive info in the URI (the http+aes URI scheme’s decryption key) similar to the now deprecated password field.

Use case is covered here: http://lists.w3.org/Archives/Public/ietf-http-wg/2012JanMar/0811.html.  Also discussion including someone mentioning the issue above.

PermalinkCommentstechnical html5 html uri uri-scheme http http+aes

Minimal Mac: TV Is Broken

2012 Feb 27, 1:58

minimalmac:

I say all of this to set up the fact that Beatrix has little idea of how traditional TV works and seeing her first real exposure to it was enlightening to say the least.

PermalinkCommentshumor technical tv netflix

(via Listen to two full albums of Daft Punk songs, remixed as...

2012 Feb 21, 7:47


(via Listen to two full albums of Daft Punk songs, remixed as Nintendo soundtracks [Daft Punk])

PermalinkCommentsmusic chip-tune video-game daft-punk

URI Percent Encoding Ignorance Level 2 - There is no Unencoded URI

2012 Feb 20, 4:00

As a professional URI aficionado I deal with various levels of ignorance on URI percent-encoding (aka URI encoding, or URL escaping).

Getting into the more subtle levels of URI percent-encoding ignorance, folks try to apply their knowledge of percent-encoding to URIs as a whole producing the concepts escaped URIs and unescaped URIs. However there are no such things - URIs themselves aren't percent-encoded or decoded but rather contain characters that are percent-encoded or decoded. Applying percent-encoding or decoding to a URI as a whole produces a new and non-equivalent URI.

Instead of lingering on the incorrect concepts we'll just cover the correct ones: there's raw unencoded data, non-normal form URIs and normal form URIs. For example:

  1. http://example.com/%74%68%65%3F%70%61%74%68?query
  2. http://example.com/the%3Fpath?query
  3. "http", "example.com", "the?path", "query"

In the above (A) is not an 'encoded URI' but rather a non-normal form URI. The characters of 'the' and 'path' are percent-encoded but as unreserved characters specific in the RFC should not be encoded. In the normal form of the URI (B) the characters are decoded. But (B) is not a 'decoded URI' -- it still has an encoded '?' in it because that's a reserved character which by the RFC holds different meaning when appearing decoded versus encoded. Specifically in this case, it appears encoded which means it is data -- a literal '?' that appears as part of the path segment. This is as opposed to the decoded '?' that appears in the URI which is not part of the path but rather the delimiter to the query.

Usually when developers talk about decoding the URI what they really want is the raw data from the URI. The raw decoded data is (C) above. The only thing to note beyond what's covered already is that to obtain the decoded data one must parse the URI before percent decoding all percent-encoded octets.

Of course the exception here is when a URI is the raw data. In this case you must percent-encode the URI to have it appear in another URI. More on percent-encoding while constructing URIs later.

PermalinkCommentsurl encoding uri technical percent-encoding

Remember when they killed off Superman?  One of the guys behind...

2012 Feb 5, 12:37


Remember when they killed off Superman?  One of the guys behind Chronicle has made this video explaining that whole thing.  Kind of like Drunk History but less drunk and more nerdy (via Death and Return of Superman)

PermalinkCommentssuperman hero comic-book humor video

Crushable has the video from the Cinefamily Pete and Pete...

2012 Jan 26, 12:03


Crushable has the video from the Cinefamily Pete and Pete tribute and panel. Also, AV Club is now inspired to have a Pete and Pete cast and crew reunion.

PermalinkComments

URI Empty Path Segments Matter

2011 Nov 23, 11:00

Shortly after joining the Internet Explorer team I got a bug from a PM on a popular Microsoft web server product that I'll leave unnamed (from now on UWS). The bug said that IE was handling empty path segments incorrectly by not removing them before resolving dotted path segments. For example UWS would do the following:

A.1. http://example.com/a/b//../
A.2. http://example.com/a/b/../
A.3. http://example.com/a/
In step 1 they are given a URI with dotted path segment and an empty path segment. In step 2 they remove the empty path segment, and in step 3 they resolve the dotted path segment. Whereas, given the same initial URI, IE would do the following:
B.1. http://example.com/a/b//../
B.2. http://example.com/a/b/
IE simply resolves the dotted path segment against the empty path segment and removes them both. So, how did I resolve this bug? As "By Design" of course!

The URI RFC allows path segments of zero length and does not assign them any special meaning. So generic user agents that intend to work on the web must not treat an empty path segment any different from a path segment with some text in it. In the case above IE is doing the correct thing.

That's the case for generic user agents, however servers may decide that a URI with an empty path segment returns the same resource as a the same URI without that empty path segment. Essentially they can decide to ignore empty path segments. Both IIS and Apache work this way and thus return the same resource for the following URIs:

http://exmaple.com/foo//bar///baz
http://example.com/foo/bar/baz
The issue for UWS is that it removes empty path segments before resolving dotted path segments. It must follow normal URI procedure before applying its own additional rules for empty path segments. Not doing that means they end up violating URI equivalency rules: URIs (A.1) and (B.2) are equivalent but UWS will not return the same resource for them.
PermalinkCommentsuser agent url ie uri technical web browser

Features of image type input tags in HTML

2011 Nov 21, 11:00

A bug came up the other day involving markup containing <input type="image" src="http://example.com/.... I knew that "image" was a valid input type but it wasn't until that moment that I realized I didn't know what it did. Looking it up I found that it displays the specified image and when the user clicks on the image, the form is submitted with an additional two name value pairs: the x and y positions of the point at which the user clicked the image.

Take for example the following HTML:

<form action="http://example.com/">
<input type="image" name="foo" src="http://deletethis.net/dave/images/davebefore.jpg">
</form>
If the user clicks on the image, the browser will submit the form with a URI like the following:http://example.com/?foo.x=145&foo.y=124.

This seemed like an incredibly specific feature to be built directly into the language when this could instead be done with javascript. I looked a bit further and saw that its been in HTML since at least HTML2, which of course makes much more sense. Javascript barely existed at that point and sending off the user's click location in a form may have been the only way to do something interesting with that action.

PermalinkCommentsuri technical form history html

Malware Signed With a Governmental Signing Key - F-Secure Weblog : News from the Lab

2011 Nov 16, 12:19

“It’s not that common to find a signed copy of malware. It’s even rarer that it’s signed with an official key belonging to a government.”

PermalinkCommentstechnical ssl

Dare to Fight, A Hilarious Ninja Ambush Prank

2011 Oct 24, 2:14
Ninjas fight dirty.
PermalinkCommentstechnical

Nintendo Game Maps

2011 Sep 28, 10:22They've got maps from your favorite NES games as giant images. I'm using SMB3 1-1 as my desktop background. I've got a four monitor setup now and so its tough to find desktop backgrounds but Mario levels easily cover my whole desktop.PermalinkCommentsgame videogame map nintendo nes

Iran blocks Tor; Tor releases same-day fix ...

2011 Sep 19, 12:53Counter intuitive argument for not making the larger fix: "Should we fix them all preemptively, meaning the next time they block us it will be through some more complex mechanism that's harder to figure out? Or should we leave things as they are, knowing there will be more blocking events but also knowing that we can solve them easily?"PermalinkCommentstor censorship government iran technical

Augmented-reality mood-detection goggles: "a primer in the law of unintended consequences" - Boing Boing

2011 Jul 9, 1:49Glasses that whisper in your ear the mood of the person with whom you're speaking and a jerk-o-meter you wear around your neck that tells you when you're being a jerk. Social devices.PermalinkCommentssocial science tool augmented-reality

draft-ietf-websec-origin-01 - The Web Origin Concept

2011 Jun 21, 1:22"This document defines the concept of an "origin", which is often used
as the scope of authority or privilege by user agents. Typically,
user agents isolate content retrieved from different origins to
prevent malicious web site operators from interfering with the
operation of benign web sites. In addition to outlining the
principles that underly the origin concept, this document defines how
to determine the origin of a URI, how to serialize an origin into a
string, and an HTTP header, named "Origin", that indicates which
origins are associated with an HTTP request."PermalinkCommentsietf reference technical web browser user-agent webbrowser origin

Rule 34 - Charlie's Diary

2011 Jun 12, 3:48Charles Stross puts parts of his new book Rule 34 on his blog: "By kind consent of the publishers, I'm able to give you a sneak preview of the first few chapters. So I'm going to roll them out on consecutive Fridays. Here's the opening."

Sneak previews in parts: PermalinkCommentscharles-stross rule-34 fiction scifi

THE FIFTY-NINE-STORY CRISIS, The New Yorker, 5/29/95, pp 45-53

2011 Jun 5, 4:56"What's an engineer's worst nightmare? To realize that the supports he designed for a skyscraper like Citicorp Center are flawed---and hurricane season is approaching."PermalinkCommentsarticle history design business engineering

HTTP framework for time-based access to resource states -- Memento

2011 Apr 30, 4:33"The HTTP-based Memento framework bridges the present and past Web by interlinking current resources with resources that encapsulate their past. It facilitates obtaining representations of prior states of a resource, available from archival resources in Web archives or version resources in content management systems, by leveraging the resource's URI and a preferred datetime. To this end, the framework introduces datetime negotiation (a variation on content negotiation), and new Relation Types for the HTTP Link header aimed at interlinking resources with their archival/version resources. It also introduces various discovery mechanisms that further support briding the present and past Web."PermalinkCommentstechnical rfc reference http header time memento archive

Junkyard Jumbotron: join all your screens into one big one, no software install needed - Boing Boing

2011 Mar 14, 4:30A web service to turn multiple web browsing devices into one larger screen. Panning and zooming on one screen (for phones) changes the whole picture.
PermalinkCommentsqrcode web video ui tv

Mind vs. Machine - Magazine - The Atlantic

2011 Feb 17, 1:01Brian Christian on his involvement in the 2009 Turing Test and his goal of winning Most Human Human.PermalinkCommentshistory ai science

"Space is meaningless": Hazard is indie, non-Euclidean, brilliant

2011 Feb 11, 5:43PermalinkCommentsgame indie hazard video
Older EntriesNewer Entries Creative Commons License Some rights reserved.