Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I accidentaly the whole applet

Name: GlacialEntropy 2009-07-13 2:23


public String readFile(File aFile) {
           
            StringBuilder contents = new StringBuilder();
           
            try {
             
              BufferedReader input =  new BufferedReader(new FileReader(aFile));
              try {
                String line = null;
               
                while (( line = input.readLine()) != null){
                  contents.append(line);
                  contents.append(System.getProperty("line.separator"));
                }
              }
              finally {
                input.close();
              }
            }
            catch (Exception ex){
              ex.printStackTrace();
            }
            System.out.println(contents.toString());
            return contents.toString();
          }

This compiles and runs properly in any IDE, but it throws security exceptions when I put it into an html file with this code:

<applet code =
"uniSim.class" width = 800 height =
600></applet>

Is this bad?

Name: Anonymous 2009-07-14 0:30

>>5
.. It's the same fucking thing; an untrusted applet can't go waltzing round anybodies file system taking whatever it likes. Did you even think about it for more than twenty seconds? Read from your SAM file? Sure. How about include/databaseinfo.inc.php? No problem. documents/bank-statement.docx? Go for it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List