Skip to content

Commit

Permalink
Merge pull request #152 from usdAG/fix/null-pointer
Browse files Browse the repository at this point in the history
Hotfix-Release v1.3.3
  • Loading branch information
fhaag95 authored Jul 30, 2024
2 parents fa9b802 + 5c798c5 commit 3d6b813
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.3.3] - 2024-07-30

### Fixed

* Fix Null Pointer Exception on startup


## [1.3.2] - 2024-07-16

### Added
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.usd.CSTC</groupId>
<artifactId>CSTC</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<name>CSTC</name>
<description>CSTC</description>

Expand Down
13 changes: 3 additions & 10 deletions src/main/java/burp/MyExtensionProvidedHttpRequestEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,9 @@ public class MyExtensionProvidedHttpRequestEditor implements ExtensionProvidedHt

MyExtensionProvidedHttpRequestEditor(EditorCreationContext creationContext, View view)
{
if(creationContext.toolSource().isFromTool(ToolType.REPEATER)) {
this.api = BurpUtils.getInstance().getApi();
this.view = view;
requestEditor = api.userInterface().createRawEditor(EditorOptions.READ_ONLY);
}
else {
this.api = null;
this.view = null;
this.requestEditor = null;
}
this.api = BurpUtils.getInstance().getApi();
this.view = view;
requestEditor = api.userInterface().createRawEditor(EditorOptions.READ_ONLY);
}

@Override
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/burp/MyHttpRequestEditorProvider.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package burp;

import burp.api.montoya.MontoyaApi;
import burp.api.montoya.core.ToolType;
import burp.api.montoya.ui.editor.extension.EditorCreationContext;
import burp.api.montoya.ui.editor.extension.ExtensionProvidedHttpRequestEditor;
import burp.api.montoya.ui.editor.extension.HttpRequestEditorProvider;
Expand All @@ -17,6 +18,11 @@ class MyHttpRequestEditorProvider implements HttpRequestEditorProvider
@Override
public ExtensionProvidedHttpRequestEditor provideHttpRequestEditor(EditorCreationContext creationContext)
{
return new MyExtensionProvidedHttpRequestEditor(creationContext, view);
if(creationContext.toolSource().isFromTool(ToolType.REPEATER)) {
return new MyExtensionProvidedHttpRequestEditor(creationContext, view);
}
else {
return null;
}
}
}

0 comments on commit 3d6b813

Please sign in to comment.