Skip to content

Commit c8d4e6e

Browse files
committed
fix for malicious links in html tags and crashtag without securitymanager
1 parent 8b4d9dc commit c8d4e6e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/me/grax/jbytemod/ui/ClassTree.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void refreshTree(JarArchive jar) {
6767
preloadMap = new HashMap<>();
6868
if (jar.getClasses() != null)
6969
for (ClassNode c : jar.getClasses().values()) {
70-
String name = c.name;
70+
String name = c.name.replace("<html>", "HTMLCrashtag");
7171
String[] path = array_unique(name.split("/"));
7272
name = String.join("/", path);
7373

src/main/java/me/grax/jbytemod/ui/lists/MyCodeList.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,8 @@ public boolean loadFields(ClassNode cn) {
584584
this.currentClass = cn;
585585
this.currentMethod = null;
586586
LazyListModel<InstrEntry> lm = new LazyListModel<InstrEntry>();
587-
editor.setText(cn.name + " Fields");
587+
String crashFixClassName = cn.name.replace("<html>", "HTMLCrashtag");
588+
editor.setText(crashFixClassName + " Fields");
588589
ArrayList<InstrEntry> entries = new ArrayList<>();
589590
for (FieldNode fn : cn.fields) {
590591
InstrEntry entry = new FieldEntry(cn, fn);

0 commit comments

Comments
 (0)