News for hackers. Stuff that matters.
Re:Show HN: A simple url shortener written in Node by inakiabt on Wednesday September 21, 2011 @11:14AM (#3022293)
Maybe adding a simple "^" at the begining of the regex should be enough :)

     /^https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/
Otherwise, could be used for XSS. Like this url (http://naurls.me/39696e):

     javascript:<script>alert('HELLO world');</script>http://naurl.me/

There are no comments on this comment yet.