diff --git a/contrib/echo.php b/contrib/echo.php index 3074833..90449f9 100644 --- a/contrib/echo.php +++ b/contrib/echo.php @@ -13,7 +13,7 @@ if ($mode === 'csp') { header("Content-Security-Policy: script-src 'self'; form-action 'self';"); -} else if ($mode === 'redirect') { +} elseif ($mode === 'redirect') { header('Location: ' . (empty($target) ? '/' : $target)); } diff --git a/src/components/DialogCustomPayloadEdit.vue b/src/components/DialogCustomPayloadEdit.vue index 23ec7d1..717f816 100644 --- a/src/components/DialogCustomPayloadEdit.vue +++ b/src/components/DialogCustomPayloadEdit.vue @@ -79,10 +79,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogCustomPayloadManagement.vue b/src/components/DialogCustomPayloadManagement.vue index 81fa727..21376a8 100644 --- a/src/components/DialogCustomPayloadManagement.vue +++ b/src/components/DialogCustomPayloadManagement.vue @@ -68,10 +68,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogReloadPrompt.vue b/src/components/DialogReloadPrompt.vue index 1428617..a850526 100644 --- a/src/components/DialogReloadPrompt.vue +++ b/src/components/DialogReloadPrompt.vue @@ -42,10 +42,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogRequestLoader.vue b/src/components/DialogRequestLoader.vue index 561b9b7..9ef5b93 100644 --- a/src/components/DialogRequestLoader.vue +++ b/src/components/DialogRequestLoader.vue @@ -78,10 +78,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogReverseShellSetting.vue b/src/components/DialogReverseShellSetting.vue index 152cae9..9cf686f 100644 --- a/src/components/DialogReverseShellSetting.vue +++ b/src/components/DialogReverseShellSetting.vue @@ -63,10 +63,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogSqlInjectionSetting.vue b/src/components/DialogSqlInjectionSetting.vue index c0c71cb..ea386fb 100644 --- a/src/components/DialogSqlInjectionSetting.vue +++ b/src/components/DialogSqlInjectionSetting.vue @@ -80,10 +80,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/DialogTestProgress.vue b/src/components/DialogTestProgress.vue index 8545f11..3b4782f 100644 --- a/src/components/DialogTestProgress.vue +++ b/src/components/DialogTestProgress.vue @@ -91,10 +91,10 @@ export default defineComponent({ const { modelValue } = toRefs(props) const shown = computed({ set: value => { - emit( - 'update:modelValue', - Object.assign({}, modelValue.value, { show: value }), - ) + emit('update:modelValue', { + ...modelValue.value, + show: value, + }) }, get: () => { return modelValue.value.show diff --git a/src/components/PrettyRawResponse.vue b/src/components/PrettyRawResponse.vue index 7963103..95d1b8e 100644 --- a/src/components/PrettyRawResponse.vue +++ b/src/components/PrettyRawResponse.vue @@ -400,7 +400,7 @@ export default defineComponent({ resultStart >= textStart && resultStart < textEnd ) { - record.range.setStart(node!, resultStart - textStart) + record.range.setStart(node, resultStart - textStart) record.startFound = true } if ( @@ -408,7 +408,7 @@ export default defineComponent({ resultEnd >= textStart && resultEnd <= textEnd ) { - record.range.setEnd(node!, resultEnd - textStart) + record.range.setEnd(node, resultEnd - textStart) finishedResultsIndex = idx } @@ -488,7 +488,7 @@ export default defineComponent({ range.selectNodeContents(htmlArea.value!) selection.removeAllRanges() - selection.addRange(range as Range) + selection.addRange(range) } const onScroll = debounce(highlightInViewportSearchResult, 32) diff --git a/src/processors/implementations/4-multipart-form-data.ts b/src/processors/implementations/4-multipart-form-data.ts index 62ecec1..5d50992 100644 --- a/src/processors/implementations/4-multipart-form-data.ts +++ b/src/processors/implementations/4-multipart-form-data.ts @@ -28,7 +28,7 @@ export default class MultipartFormDataProcessor extends BodyProcessor { const content = parts[idx].substring(delimiterIndex + (crlf ? 4 : 2)) let matched = null - const regex = RegExp('(name|filename)=(?:"([^"]+)"|([^;]+))', 'gi') + const regex = /(name|filename)=(?:"([^"]+)"|([^;]+))/gi while ((matched = regex.exec(header)) !== null) { if (matched[1].toLowerCase() === 'name') { field.name = matched[2] || matched[3]