fix: recover BPM browsers and harden redaction and Windows supervision
This commit is contained in:
1 parent
acba28c879
commit
db98d78f6b
14 files changed
+223
-59
No files matched your search
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
const crypto=require('node:crypto'),{fail}=require('./store.cjs');
|
||||
function redact(value,maxLength=2000){return String(value??'').replace(/\b(?:Bearer\s+)[^\s,;]+/gi,'Bearer [已隐藏]').replace(/((?:password|passwd|api[_-]?key|token|cookie|authorization|密码)\s*[=::]\s*)([^\s,;]+)/gi,'$1[已隐藏]').replace(/\b[A-Za-z]:[\\/][^\r\n"'<>]*/g,'[本机路径已隐藏]').replace(/\\\\[^\r\n"'<>]*/g,'[共享路径已隐藏]').slice(0,maxLength);}
|
||||
const {redact}=require('../../shared/redact.cjs');
|
||||
const cleanMessage=(value,key)=>String(value??'').split(key||'\u0000').join('[已隐藏]');
|
||||
function snapshot({workspace,scanner,storage,dashboard},user){
|
||||
const w=workspace?.snapshot()||{connections:[],exceptions:[]},authorized=c=>user.role==='admin'||c.owner===user.username;
|
||||
|
||||
Reference in new issue
Block a user