Skip to content

Commit

Permalink
fixed typos in util.js
Browse files Browse the repository at this point in the history
  • Loading branch information
James-E-A committed Aug 21, 2020
1 parent 3671b5f commit 6c51e45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const host_country = new Object();
JSON.parse(data).forEach(ca=>{
let sha256fp=ca["SHA-256 Fingerprint"].replaceAll(/(\w{2})(?=\w)/g,'$1:');

let hostParts=(new URL(ca["Certification Practice Statement (CPS)"]).hostname.split('.')
let hostParts=(new URL(ca["Certification Practice Statement (CPS)"])).hostname.split('.')
//www isn't a real subdomain
if(hostParts[0]=='www') hostParts.splice(0,1);
//neither is pki
if(hostParts[0]=='pki') hostParts.splice(0,1);
//*.gov.<ccTLD> is just *from* that country
if(hostParts[hostParts.length-2]=='gov' and hostParts[hostParts.length-1].length==2){
if(hostParts[hostParts.length-2]=='gov' && hostParts[hostParts.length-1].length==2){
hostParts.splice(0,[hostParts.length-1]);
host_country[sha256fp]=hostParts[0];
}
Expand Down

0 comments on commit 6c51e45

Please sign in to comment.