0.8.72 release
This commit is contained in:
@@ -4412,7 +4412,7 @@ const AngularWorkflow = (props) => {
|
||||
<div style={{marginTop: "20px", marginBottom: "7px", display: "flex"}}>
|
||||
<div style={{width: "17px", height: "17px", borderRadius: 17 / 2, backgroundColor: "#f85a3e", marginRight: "10px"}}/>
|
||||
<div style={{flex: "10"}}>
|
||||
<b>API-key: </b>
|
||||
<b>API-key </b>
|
||||
</div>
|
||||
</div>
|
||||
<TextField
|
||||
|
||||
@@ -536,6 +536,7 @@ const AppCreator = (props) => {
|
||||
//console.log("Handle requestbody: ", methodvalue["requestBody"])
|
||||
if (methodvalue["requestBody"]["content"] !== undefined) {
|
||||
if (methodvalue["requestBody"]["content"]["application/json"] !== undefined) {
|
||||
newaction["headers"] = "Content-Type=application/json\nAccept=application/json"
|
||||
if (methodvalue["requestBody"]["content"]["application/json"]["schema"] !== undefined && methodvalue["requestBody"]["content"]["application/json"]["schema"] !== null) {
|
||||
if (methodvalue["requestBody"]["content"]["application/json"]["schema"]["properties"] !== undefined) {
|
||||
var tmpobject = {}
|
||||
@@ -558,11 +559,13 @@ const AppCreator = (props) => {
|
||||
const parsedkey = propkey.replaceAll(" ", "_").toLowerCase()
|
||||
newbody[parsedkey] = "${"+parsedkey+"}"
|
||||
}
|
||||
|
||||
newaction["body"] = JSON.stringify(newbody, null, 2)
|
||||
}
|
||||
}
|
||||
} else if (methodvalue["requestBody"]["content"]["application/xml"] !== undefined) {
|
||||
console.log("METHOD XML: ", methodvalue)
|
||||
newaction["headers"] = "Content-Type=application/xml\nAccept=application/xml"
|
||||
if (methodvalue["requestBody"]["content"]["application/xml"]["schema"] !== undefined && methodvalue["requestBody"]["content"]["application/xml"]["schema"] !== null) {
|
||||
if (methodvalue["requestBody"]["content"]["application/xml"]["schema"]["properties"] !== undefined) {
|
||||
var tmpobject = {}
|
||||
@@ -851,6 +854,9 @@ const AppCreator = (props) => {
|
||||
}
|
||||
|
||||
if (securitySchemes !== undefined) {
|
||||
// FIXME: Should add Oauth2 (Microsoft) and JWT (Wazuh)
|
||||
//console.log("SECURITY: ", securitySchemes)
|
||||
//if (Object.entries(securitySchemes) > 1 &&
|
||||
for (const [key, value] of Object.entries(securitySchemes)) {
|
||||
if (value.scheme === "bearer") {
|
||||
setAuthenticationOption("Bearer auth")
|
||||
@@ -1240,7 +1246,7 @@ const AppCreator = (props) => {
|
||||
'Content-Type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
body: JSON.stringify(data, null, 4),
|
||||
credentials: "include",
|
||||
})
|
||||
.then((response) => {
|
||||
@@ -2428,8 +2434,8 @@ const AppCreator = (props) => {
|
||||
Cancel
|
||||
</Button>
|
||||
<Button variant="contained" style={{borderRadius: "0px"}} disabled={disableImageUpload} onClick={() => {
|
||||
onSaveAppIcon()
|
||||
}} color="primary">
|
||||
onSaveAppIcon()
|
||||
}} color="primary">
|
||||
Continue
|
||||
</Button>
|
||||
</DialogActions>
|
||||
|
||||
@@ -595,7 +595,7 @@ const Workflows = (props) => {
|
||||
|
||||
for (var subkey in data.actions[key].parameters) {
|
||||
const param = data.actions[key].parameters[subkey]
|
||||
if (param.name.includes("key") || param.name.includes("user") || param.name.includes("pass") || param.name.includes("api") || param.name.includes("auth") || param.name.includes("secret") || param.name.includes("domain") || param.name.includes("url")) {
|
||||
if (param.name.includes("key") || param.name.includes("user") || param.name.includes("pass") || param.name.includes("api") || param.name.includes("auth") || param.name.includes("secret") || param.name.includes("domain") || param.name.includes("url") || param.name.includes("mail")) {
|
||||
// FIXME: This may be a vuln if api-keys are generated that start with $
|
||||
if (param.value.startsWith("$")) {
|
||||
console.log("Skipping field, as it's referencing a variable")
|
||||
@@ -629,7 +629,7 @@ const Workflows = (props) => {
|
||||
if (data.workflow_variables !== null && data.workflow_variables !== undefined) {
|
||||
for (var key in data.workflow_variables) {
|
||||
const param = data.workflow_variables[key]
|
||||
if (param.name.includes("key") || param.name.includes("user") || param.name.includes("pass") || param.name.includes("api") || param.name.includes("auth") || param.name.includes("secret")) {
|
||||
if (param.name.includes("key") || param.name.includes("user") || param.name.includes("pass") || param.name.includes("api") || param.name.includes("auth") || param.name.includes("secret")|| param.name.includes("email")) {
|
||||
param.value = ""
|
||||
param.is_valid = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user