Help make code secure

D

Daniel Pitts

"Hi
I have created a real time java code compiler at http://www.guru99.com/try-java-editor.htmlAlthough I have checked all security aspects ... do you experts see any major security leak that I need to care of?"

import java.net.URL;

class Demo {
public static void main(String args[]) throws Exception {
byte[] buffer = new byte[2048];
URL url = new URL("file:///");
java.io.InputStream is = (java.io.InputStream)url.getContent();
int r = is.read(buffer);
System.out.println(new String(buffer, 0, r));

}
}


This runs, very dangerous.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top