Added header param check to curl parsing

This commit is contained in:
frikky
2020-06-04 11:15:51 +02:00
parent 5307238eae
commit 7f811b6fd5
3 changed files with 33 additions and 20 deletions
+6 -2
View File
@@ -5,10 +5,14 @@
![Example Shuffle webhook integration](shuffle_webhook.png) ![Example Shuffle webhook integration](shuffle_webhook.png)
## Try it ## Getting started
* Self-hosted: Check out the [installation guide](https://github.com/frikky/shuffle/blob/master/install-guide.md). * Self-hosted: Check out the [installation guide](https://github.com/frikky/shuffle/blob/master/install-guide.md) and [getting started](https://shuffler.io/docs/getting_started)
* Cloud: Register at https://shuffler.io/register and get cooking (there are some differences!) * Cloud: Register at https://shuffler.io/register and get cooking (there are some differences!)
## Blogposts
[1. Introducing Shuffle](https://medium.com/security-operation-capybara/introducing-shuffle-an-open-source-soar-platform-part-1-58a529de7d12)
[2. Getting started with Shuffle](https://medium.com/security-operation-capybara/getting-started-with-shuffle-an-open-source-soar-platform-part-2-1d7c67a64244)
## Related repositories ## Related repositories
* Apps: https://github.com/frikky/shuffle-apps * Apps: https://github.com/frikky/shuffle-apps
* Workflows: https://github.com/frikky/shuffle-workflows (empty) * Workflows: https://github.com/frikky/shuffle-workflows (empty)
+4
View File
@@ -1261,6 +1261,10 @@ const AppCreator = (props) => {
if (request.header !== undefined && request.header !== null) { if (request.header !== undefined && request.header !== null) {
var headers = [] var headers = []
for (let [key, value] of Object.entries(request.header)) { for (let [key, value] of Object.entries(request.header)) {
if (parameterName !== undefined && key.toLowerCase() === parameterName.toLowerCase()) {
continue
}
headers += key+"="+value+"\n" headers += key+"="+value+"\n"
} }
+23 -18
View File
@@ -20,6 +20,8 @@ import YAML from 'yaml'
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import Breadcrumbs from '@material-ui/core/Breadcrumbs'; import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import CloudUploadIcon from '@material-ui/icons/CloudUpload';
import PublishIcon from '@material-ui/icons/Publish';
import CloudDownload from '@material-ui/icons/CloudDownload'; import CloudDownload from '@material-ui/icons/CloudDownload';
import EditIcon from '@material-ui/icons/Edit'; import EditIcon from '@material-ui/icons/Edit';
import DeleteIcon from '@material-ui/icons/Delete'; import DeleteIcon from '@material-ui/icons/Delete';
@@ -462,7 +464,7 @@ const Apps = (props) => {
<div/> <div/>
<div style={{marginTop: 20}}> <div style={{marginTop: 20}}>
<Button <Button
variant="outlined" variant="text"
component="label" component="label"
color="primary" color="primary"
style={{marginRight: 10, }} style={{marginRight: 10, }}
@@ -470,11 +472,12 @@ const Apps = (props) => {
setOpenApiModal(true) setOpenApiModal(true)
}} }}
> >
Create from OpenAPI <PublishIcon style={{marginRight: 5}} /> Create from OpenAPI
</Button> </Button>
<Link to="/apps/new" style={{textDecoration: "none", color: "#f85a3e"}}> &nbsp;OR&nbsp;
<Link to="/apps/new" style={{marginLeft: 5, textDecoration: "none", color: "#f85a3e"}}>
<Button <Button
variant="outlined" variant="text"
component="label" component="label"
color="primary" color="primary"
style={{}} style={{}}
@@ -543,18 +546,20 @@ const Apps = (props) => {
setSearchBackend(!searchBackend)} setSearchBackend(!searchBackend)}
} />} } />}
/> />
<Button <Tooltip title={"Upload from Github"} style={{marginTop: "28px", width: "100%"}} aria-label={"Upload"}>
variant="outlined" <Button
component="label" variant="outlined"
color="primary" component="label"
style={{margin: 5, maxHeight: 50, marginTop: 10}} color="primary"
onClick={() => { style={{margin: 5, maxHeight: 50, marginTop: 10}}
setOpenApi(baseRepository) onClick={() => {
setLoadAppsModalOpen(true) setOpenApi(baseRepository)
}} setLoadAppsModalOpen(true)
> }}
Download more apps >
</Button> <CloudUploadIcon />
</Button>
</Tooltip>
</div> </div>
<TextField <TextField
style={{backgroundColor: inputColor}} style={{backgroundColor: inputColor}}
@@ -574,10 +579,10 @@ const Apps = (props) => {
handleSearchChange(event.target.value) handleSearchChange(event.target.value)
}} }}
/> />
<div style={{marginTop: 15}}> <div style={{marginTop: 15, height: "100%", paddingBottom: 150,}}>
{apps.length > 0 ? {apps.length > 0 ?
filteredApps.length > 0 ? filteredApps.length > 0 ?
<div style={{maxHeight: "78vh", overflowY: "scroll"}}> <div style={{maxHeight: "75vh", overflowY: "scroll"}}>
{filteredApps.map(app => { {filteredApps.map(app => {
return ( return (
appPaper(app) appPaper(app)