Harden Windows DLP enforcement and Electron runtime packaging
This commit is contained in:
1 parent
e7d778aeac
commit
8a253eda89
120 files changed
+3569
-135
No files matched your search
@@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
function deploymentProxyCredentials(selected,environment=process.env){
|
||||
const {SAFETYNET_PROXY_USER:user,SAFETYNET_PROXY_PASSWORD:password,SAFETYNET_PROXY_AUTH_HOST:host,SAFETYNET_PROXY_AUTH_PORT:port}=environment;
|
||||
if(!user||!password||!host||!port||!/^[0-9]{1,5}$/.test(port)||Number(port)<1||Number(port)>65535)return null;
|
||||
if(typeof selected?.host!=='string'||selected.host.toLowerCase()!==host.toLowerCase()||Number(selected.port)!==Number(port))return null;
|
||||
return {username:user,password};
|
||||
}
|
||||
module.exports={deploymentProxyCredentials};
|
||||
Reference in new issue
Block a user