Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #63 from konklone/issue-62
Browse files Browse the repository at this point in the history
Hopefully numbers in domains are left alone (fix issue#62)
  • Loading branch information
konklone committed Oct 7, 2014
2 parents cc98bf7 + 35d8183 commit 900e701
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion shaaaaa.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var Shaaa = {
if (!options) options = {};

// This accounts for -servername/SNI, which cannot have a port
var server_name = domain.replace(/[^\w\.\-]|[$:\d+]/g, '');
var server_name = domain.replace(/[^\w\.\-]+(:\d+])/, '');

// This accounts for -connect, which can have a port
var server_connect = domain.replace(/[^\w\.\-:]/g, '');
Expand Down
10 changes: 10 additions & 0 deletions test/shaaaaa.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ var sites = [
{good: false, algorithm: "sha1"}
]
},
{
name: "Domain with number and SNI, teacup.p3k.io",
domain: "teacup.p3k.io",

diagnosis: "good",
cert: {good: true, algorithm: "sha256"},
intermediates: [
{good: true, algorithm: "sha256"}
]
},
{
name: "Domain with port, google.com:443",
domain: "google.com:443",
Expand Down

0 comments on commit 900e701

Please sign in to comment.