This repository has been archived by the owner. It is now read-only.
Browse files

Ignore invalid hostnames in hhvm-attach deep link

Summary: Provide nicer handling and an error message when following a deep link requesting HHVM debugger attach that has a malformed host name.

Reviewed By: hansonw

Differential Revision: D7308417

fbshipit-source-id: 60bae4013444008980dda9cda8dec5f8ae20944f
  • Loading branch information...
ebluestein authored and facebook-github-bot committed Mar 16, 2018
1 parent ee8e058 commit 65f6bbd683404be1bb569b8d1be84b5d4c74a324
Showing with 11 additions and 0 deletions.
  1. +11 −0 pkg/nuclide-hhvm/lib/main.js
@@ -113,6 +113,17 @@ class Activation {

const host = nuclideUri.getHostname(pathString);

// Allow only valid hostname characters, per RFC 952:
const invalidMatch = host.match(/[^A-Za-z0-9\-._]+/);
if (invalidMatch != null) {
'The specified host name contained invalid characters.',

const cwd = nuclideUri.createRemoteUri(host, hackRootString);
const notification = atom.notifications.addInfo(

0 comments on commit 65f6bbd

Please sign in to comment.