senchalabs/connect — pull request #747 by elus (2013-02-11 16:48:52+00:00)
Title: don't accept RegExp grammar in vhost's hostname

There are some side-effects of current implementation of hostname wildcards in vhost middleware. It dynamically creates a RegExp by replacing the star but leaves other special characters intact.

https://github.com/senchalabs/connect/blob/master/lib/middleware/vhost.js#L31

I assume that this behavior is not expected (e.g. "dot" should match "dot", not any character). Escaping all RegExp special characters (or easier - all non-alphanumeric characters) should solve the problem.