Repaired boundary checking

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2 2 years ago
parent d0c38170be
commit 0076c5efbc
  1. BIN
      bin/ArcadeReader$1.class
  2. BIN
      bin/ArcadeReader.class
  3. BIN
      bin/exceptions/FailedResponseException.class
  4. BIN
      bin/readers/Box.class
  5. BIN
      bin/readers/ColorRange.class
  6. BIN
      bin/readers/DDRReader.class
  7. BIN
      bin/readers/ITGReader.class
  8. BIN
      bin/readers/LoveLiveReader.class
  9. BIN
      bin/readers/PopnReader.class
  10. BIN
      bin/readers/Reader.class
  11. BIN
      bin/readers/SoundVoltexReader.class
  12. BIN
      bin/readers/TestReader.class
  13. BIN
      bin/readers/fonts/Font.class
  14. BIN
      bin/readers/fonts/Glyph.class
  15. BIN
      bin/requests/GETRequest$1.class
  16. BIN
      bin/requests/GETRequest.class
  17. BIN
      bin/requests/MultipartUtility.class
  18. BIN
      bin/requests/POSTRequest$1.class
  19. BIN
      bin/requests/POSTRequest.class
  20. BIN
      bin/sigPlace.class
  21. BIN
      bin/sigServer.class
  22. 18
      out/DIRECTORY_LISTING
  23. 14
      out/articles/DIRECTORY_LISTING
  24. 12
      out/articles/test articles/DIRECTORY_LISTING
  25. BIN
      out/uploads/upload.png
  26. 31
      sigServer.java

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -16,15 +16,15 @@
</script> </script>
</head> </head>
<body> <body>
<h2>Directory Listing for /</h2><div class="folderlisting"><a href="/.." class="icon">&#x1F4C1;</a><a href="/..">.. </a><a href="/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/reset.css" class="icon">&#x1F5CE;</a><a href="/reset.css">reset.css</a> 2022-08-20T17:25:47.863330702Z niconiconii 1092</div> <h2>Directory Listing for /</h2><div class="folderlisting"><a href="/.." class="icon">&#x1F4C1;</a><a href="/..">.. </a><a href="/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/reset.css" class="icon">&#x1F5CE;</a><a href="/reset.css">reset.css</a> 2022-08-20T18:02:27.471966018Z niconiconii 1092</div>
<div class="folderlisting"><a href="/articles" class="icon">&#x1F4C1;</a><a href="/articles">articles</a> 2022-08-20T17:25:48.359324585Z niconiconii 4096</div> <div class="folderlisting"><a href="/articles" class="icon">&#x1F4C1;</a><a href="/articles">articles</a> 2022-08-20T18:02:27.975957114Z niconiconii 4096</div>
<div class="filelisting"><a href="/uploadform.html" class="icon">&#x1F5CE;</a><a href="/uploadform.html">uploadform.html</a> 2022-08-20T17:25:48.291325424Z niconiconii 1863</div> <div class="filelisting"><a href="/uploadform.html" class="icon">&#x1F5CE;</a><a href="/uploadform.html">uploadform.html</a> 2022-08-20T18:02:27.883958739Z niconiconii 1863</div>
<div class="filelisting"><a href="/error.html" class="icon">&#x1F5CE;</a><a href="/error.html">error.html</a> 2022-08-20T17:25:48.291325424Z niconiconii 1828</div> <div class="filelisting"><a href="/error.html" class="icon">&#x1F5CE;</a><a href="/error.html">error.html</a> 2022-08-20T18:02:27.883958739Z niconiconii 1828</div>
<div class="filelisting"><a href="/sig.css" class="icon">&#x1F5CE;</a><a href="/sig.css">sig.css</a> 2022-08-20T17:25:48.279325571Z niconiconii 11140</div> <div class="filelisting"><a href="/sig.css" class="icon">&#x1F5CE;</a><a href="/sig.css">sig.css</a> 2022-08-20T18:02:27.863959093Z niconiconii 11140</div>
<div class="filelisting"><a href="/testfile.html" class="icon">&#x1F5CE;</a><a href="/testfile.html">testfile.html</a> 2022-08-20T17:25:48.291325424Z niconiconii 1783</div> <div class="filelisting"><a href="/testfile.html" class="icon">&#x1F5CE;</a><a href="/testfile.html">testfile.html</a> 2022-08-20T18:02:27.887958669Z niconiconii 1783</div>
<div class="filelisting"><a href="/otherpage.html" class="icon">&#x1F5CE;</a><a href="/otherpage.html">otherpage.html</a> 2022-08-20T17:25:48.307325226Z niconiconii 88526</div> <div class="filelisting"><a href="/otherpage.html" class="icon">&#x1F5CE;</a><a href="/otherpage.html">otherpage.html</a> 2022-08-20T18:02:27.903958386Z niconiconii 88526</div>
<div class="folderlisting"><a href="/images" class="icon">&#x1F4C1;</a><a href="/images">images</a> 2022-08-20T17:25:48.355324635Z niconiconii 4096</div> <div class="folderlisting"><a href="/images" class="icon">&#x1F4C1;</a><a href="/images">images</a> 2022-08-20T18:02:27.971957184Z niconiconii 4096</div>
<div class="filelisting"><a href="/codeBackground" class="icon">&#x1F5CE;</a><a href="/codeBackground">codeBackground</a> 2022-08-20T17:25:48.287325473Z niconiconii 2635</div> <div class="filelisting"><a href="/codeBackground" class="icon">&#x1F5CE;</a><a href="/codeBackground">codeBackground</a> 2022-08-20T18:02:27.875958881Z niconiconii 2635</div>
</div> <!--End Content Body--> </div> <!--End Content Body-->
<div class="codeForeground" id="codeForeground"></div> <div class="codeForeground" id="codeForeground"></div>

@ -16,13 +16,13 @@
</script> </script>
</head> </head>
<body> <body>
<h2>Directory Listing for /articles/</h2><div class="folderlisting"><a href="/articles/.." class="icon">&#x1F4C1;</a><a href="/articles/..">.. </a><a href="/articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/sigplace1.article" class="icon">&#x1F5CE;</a><a href="/articles/sigplace1.article">sigplace1.article</a> 2022-08-20T17:25:48.259325819Z niconiconii 80858</div> <h2>Directory Listing for /articles/</h2><div class="folderlisting"><a href="/articles/.." class="icon">&#x1F4C1;</a><a href="/articles/..">.. </a><a href="/articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/sigplace1.article" class="icon">&#x1F5CE;</a><a href="/articles/sigplace1.article">sigplace1.article</a> 2022-08-20T18:02:27.823959799Z niconiconii 80858</div>
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article.html" class="icon">&#x1F5CE;</a><a href="/articles/Love Live! Custom Arcade Controller.article.html">Love Live! Custom Arcade Controller.article.html</a> 2022-08-20T17:25:48.347324733Z niconiconii 10444</div> <div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article.html" class="icon">&#x1F5CE;</a><a href="/articles/Love Live! Custom Arcade Controller.article.html">Love Live! Custom Arcade Controller.article.html</a> 2022-08-20T18:02:27.963957326Z niconiconii 10444</div>
<div class="filelisting"><a href="/articles/sigplace1.article.html" class="icon">&#x1F5CE;</a><a href="/articles/sigplace1.article.html">sigplace1.article.html</a> 2022-08-20T17:25:48.32732498Z niconiconii 90753</div> <div class="filelisting"><a href="/articles/sigplace1.article.html" class="icon">&#x1F5CE;</a><a href="/articles/sigplace1.article.html">sigplace1.article.html</a> 2022-08-20T18:02:27.927957962Z niconiconii 90753</div>
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article" class="icon">&#x1F5CE;</a><a href="/articles/curabitur vel tempus ex.article">curabitur vel tempus ex.article</a> 2022-08-20T17:25:48.259325819Z niconiconii 730</div> <div class="filelisting"><a href="/articles/curabitur vel tempus ex.article" class="icon">&#x1F5CE;</a><a href="/articles/curabitur vel tempus ex.article">curabitur vel tempus ex.article</a> 2022-08-20T18:02:27.823959799Z niconiconii 730</div>
<div class="folderlisting"><a href="/articles/test articles" class="icon">&#x1F4C1;</a><a href="/articles/test articles">test articles</a> 2022-08-20T17:25:48.343324783Z niconiconii 4096</div> <div class="folderlisting"><a href="/articles/test articles" class="icon">&#x1F4C1;</a><a href="/articles/test articles">test articles</a> 2022-08-20T18:02:27.959957396Z niconiconii 4096</div>
<div class="filelisting"><a href="/articles/curabitur vel tempus ex.article.html" class="icon">&#x1F5CE;</a><a href="/articles/curabitur vel tempus ex.article.html">curabitur vel tempus ex.article.html</a> 2022-08-20T17:25:48.33132493Z niconiconii 10653</div> <div class="filelisting"><a href="/articles/curabitur vel tempus ex.article.html" class="icon">&#x1F5CE;</a><a href="/articles/curabitur vel tempus ex.article.html">curabitur vel tempus ex.article.html</a> 2022-08-20T18:02:27.935957821Z niconiconii 10653</div>
<div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article" class="icon">&#x1F5CE;</a><a href="/articles/Love Live! Custom Arcade Controller.article">Love Live! Custom Arcade Controller.article</a> 2022-08-20T17:25:48.263325769Z niconiconii 497</div> <div class="filelisting"><a href="/articles/Love Live! Custom Arcade Controller.article" class="icon">&#x1F5CE;</a><a href="/articles/Love Live! Custom Arcade Controller.article">Love Live! Custom Arcade Controller.article</a> 2022-08-20T18:02:27.831959658Z niconiconii 497</div>
</div> <!--End Content Body--> </div> <!--End Content Body-->
<div class="codeForeground" id="codeForeground"></div> <div class="codeForeground" id="codeForeground"></div>

@ -16,12 +16,12 @@
</script> </script>
</head> </head>
<body> <body>
<h2>Directory Listing for /articles/test articles/</h2><div class="folderlisting"><a href="/articles/test articles/.." class="icon">&#x1F4C1;</a><a href="/articles/test articles/..">.. </a><a href="/articles/test articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/test articles/test3.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test3.article">test3.article</a> 2022-08-20T17:25:48.263325769Z niconiconii 994</div> <h2>Directory Listing for /articles/test articles/</h2><div class="folderlisting"><a href="/articles/test articles/.." class="icon">&#x1F4C1;</a><a href="/articles/test articles/..">.. </a><a href="/articles/test articles/.." class="nounderline">(Previous Directory)</a></div><div class="filelisting"><a href="/articles/test articles/test3.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test3.article">test3.article</a> 2022-08-20T18:02:27.827959728Z niconiconii 994</div>
<div class="filelisting"><a href="/articles/test articles/test2.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test2.article">test2.article</a> 2022-08-20T17:25:48.263325769Z niconiconii 781</div> <div class="filelisting"><a href="/articles/test articles/test2.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test2.article">test2.article</a> 2022-08-20T18:02:27.827959728Z niconiconii 781</div>
<div class="filelisting"><a href="/articles/test articles/test2.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test2.article.html">test2.article.html</a> 2022-08-20T17:25:48.339324832Z niconiconii 10668</div> <div class="filelisting"><a href="/articles/test articles/test2.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test2.article.html">test2.article.html</a> 2022-08-20T18:02:27.951957538Z niconiconii 10668</div>
<div class="filelisting"><a href="/articles/test articles/test3.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test3.article.html">test3.article.html</a> 2022-08-20T17:25:48.335324882Z niconiconii 10881</div> <div class="filelisting"><a href="/articles/test articles/test3.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test3.article.html">test3.article.html</a> 2022-08-20T18:02:27.943957679Z niconiconii 10881</div>
<div class="filelisting"><a href="/articles/test articles/test1.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test1.article.html">test1.article.html</a> 2022-08-20T17:25:48.343324783Z niconiconii 10972</div> <div class="filelisting"><a href="/articles/test articles/test1.article.html" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test1.article.html">test1.article.html</a> 2022-08-20T18:02:27.959957396Z niconiconii 10972</div>
<div class="filelisting"><a href="/articles/test articles/test1.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test1.article">test1.article</a> 2022-08-20T17:25:48.263325769Z niconiconii 1085</div> <div class="filelisting"><a href="/articles/test articles/test1.article" class="icon">&#x1F5CE;</a><a href="/articles/test articles/test1.article">test1.article</a> 2022-08-20T18:02:27.831959658Z niconiconii 1085</div>
</div> <!--End Content Body--> </div> <!--End Content Body-->
<div class="codeForeground" id="codeForeground"></div> <div class="codeForeground" id="codeForeground"></div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

@ -154,21 +154,22 @@ public class sigServer {
filename=null; filename=null;
} }
} }
} } else {
if (line.contains("Content-Length: ")) { if (line.contains("Content-Length: ")) {
expectedDataLength=Integer.parseInt(line.substring("Content-Length: ".length())); expectedDataLength=Integer.parseInt(line.substring("Content-Length: ".length()));
System.out.println("Expecting a length of "+expectedDataLength); System.out.println("Expecting a length of "+expectedDataLength);
} }
if (line.contains("Content-Type:")) { if (line.contains("Content-Type:")) {
if (line.contains("Content-Type: multipart/form-data; boundary=")) { if (line.contains("Content-Type: multipart/form-data; boundary=")) {
boundary="--"+line.substring("Content-Type: multipart/form-data; boundary=".length()); boundary="--"+line.substring("Content-Type: multipart/form-data; boundary=".length());
} else } else
if (line.contains("application/json")){ if (line.contains("application/json")){
isApplication=true; isApplication=true;
System.out.println("Application request detected."); System.out.println("Application request detected.");
//Keep going for now. //Keep going for now.
} else { } else {
break; //Incompatible type. break; //Incompatible type.
}
} }
} }
} else } else

Loading…
Cancel
Save